Insertion

I have one form called Material request like purchase requisition.I have given the link to purchase Requisition over there.I am creating and saving the record in purchase requisition in header level. that moment it should insert the all records what ever records i have it in material requisition line level.if its possible means please give the example code.

Thanks in advance.

Do you mean inserting records in purchReqLine?

What code you want?

(Insertion code) i want to insert the record in purchreqline…wher should i write and what should i write…?

/////this is a sample code

static void createPurchaseRequisition(Args _args)///Kranthi
{
PurchReqTable purchReqTable;
PurchReqLine purchReqLine;
NumberSeq num;
AxPurchReqLine axPurchReqLine;
;
purchReqTable.initValue();
num = NumberSeq::newGetNum(PurchParameters::numRefPurchReqId());
purchReqTable.PurchReqId = num.num();
num.used();
purchReqTable.initFromPurchReqTable(purchReqTable);
purchReqTable.PurchReqName = “Test”;
purchReqTable.insert();
info(strfmt(“PurchReqId - %1”,purchReqTable.PurchReqId));

axPurchReqLine = new axPurchReqLine();
axPurchReqLine.parmPurchReqId(purchReqTable.PurchReqId);
axPurchReqLine.parmLineNum();
axPurchReqLine.parmItemId(“1001”);
axPurchReqLine.parmPurchQty(100);
axPurchReqLine.parmCurrencyCode(“USD”);
axPurchReqLine.save();
}