Hi Experts
Please help me with this.
Am working with 'BAPI_REQUISITION_CREATE'. Able to create PR ( with constant data) but the service line item is not seen with ME53N. No error message displayed. Have checked the SAP note 420331.
The code is as below:
move '9' to it_BAPIEBANC-ITEM_CAT.
move 'sdfgsdfgdfsg' to it_BAPIEBANC-SHORT_TEXT.
move 'F' to it_BAPIEBANC-ACCTASSCAT.
move 1 to it_BAPIEBANC-QUANTITY.
move 'M2' to it_BAPIEBANC-UNIT.
move '1' to it_BAPIEBANC-DEL_DATCAT. "it_file-del_date_cat
move sy-datum to it_BAPIEBANC-DELIV_DATE.
move '100CC' to it_BAPIEBANC-MAT_GRP.
move '1CEN' to it_BAPIEBANC-PLANT.
move 'CIVIL' to it_BAPIEBANC-PREQ_NAME.
move '1001' to it_BAPIEBANC-PURCH_ORG.
move 'P11' to it_BAPIEBANC-PUR_GROUP.
MOVE 'NB' TO it_BAPIEBANC-DOC_TYPE.
MOVE 'X' TO it_BAPIEBANC-GR_IND.
MOVE 'X' TO it_BAPIEBANC-IR_IND.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = 'SERVICE'
IMPORTING
NUMBER = v_packno
RETURNCODE = RCODE.
it_BAPIEBANC-PCKG_NO = v_packno.
MOVE '00010' to it_BAPIEBANC-PREQ_ITEM.
APPEND it_BAPIEBANC.
CLEAR it_BAPIEBANC.
move '000001000341' to it_BAPIEBKN-ORDER_NO.
move 'AMINFRA' to it_BAPIEBKN-COST_CTR.
move '0040401100' to it_BAPIEBKN-G_L_ACCT.
MOVE '00010' to it_BAPIEBKN-PREQ_ITEM.
MOVE '01' to it_BAPIEBKN-SERIAL_NO.
APPEND it_BAPIEBKN.
CLEAR it_BAPIEBKN.
move v_packno to IT_BAPIESLLC-PCKG_NO.
IT_BAPIESLLC-subpckg_no = v_packno + 1 .
move '0000000001' to IT_BAPIESLLC-LINE_NO.
move '0000000000' to IT_BAPIESLLC-EXT_LINE.
MOVE 'sdfgsdfgf' TO IT_BAPIESLLC-SHORT_TEXT.
IT_BAPIESLLC-OUTL_IND = 'X'.
IT_BAPIESLLC-FROM_LINE = '1'.
APPEND IT_BAPIESLLC.
CLEAR IT_BAPIESLLC.
**service with master
IT_BAPIESLLC-PCKG_NO = V_PACKNO + 1.
IT_BAPIESLLC-subpckg_no = 0 .
move '0000000002' to IT_BAPIESLLC-LINE_NO.
move '0000000010' to IT_BAPIESLLC-EXT_LINE.
move '000000000003000193' TO IT_BAPIESLLC-SERVICE.
MOVE 'sdfgsdfgf' TO IT_BAPIESLLC-SHORT_TEXT. "it_file-DESC(40)
MOVE 1 TO IT_BAPIESLLC-QUANTITY. "it_file-QTY
MOVE 'M2' TO IT_BAPIESLLC-BASE_UOM. "it_file-UNIT
IT_BAPIESLLC-UOM_ISO = 'MTK'.
MOVE 1 TO IT_BAPIESLLC-price_unit .
IT_BAPIESLLC-GR_PRICE = 100.
APPEND IT_BAPIESLLC.
CLEAR IT_BAPIESLLC.
service without master
IT_BAPIESLLC-PCKG_NO = V_PACKNO + 1.
IT_BAPIESLLC-subpckg_no = 0 .
move '0000000003' to IT_BAPIESLLC-LINE_NO.
move '0000000020' to IT_BAPIESLLC-EXT_LINE.
move '000000000003000193' TO IT_BAPIESLLC-SERVICE.
MOVE 'sdfgsdfgf' TO IT_BAPIESLLC-SHORT_TEXT. "it_file-DESC(40)
MOVE 1 TO IT_BAPIESLLC-QUANTITY. "it_file-QTY
MOVE 'M2' TO IT_BAPIESLLC-BASE_UOM. "it_file-UNIT
IT_BAPIESLLC-UOM_ISO = 'MTK'.
MOVE 1 TO IT_BAPIESLLC-price_unit .
IT_BAPIESLLC-GR_PRICE = 100.
APPEND IT_BAPIESLLC.
CLEAR IT_BAPIESLLC.
it_BAPIESKLC-PCKG_NO = v_packno + 1.
it_BAPIESKLC-LINE_NO = '0000000002'.
it_BAPIESKLC-SERNO_LINE = '01'.
it_BAPIESKLC-SERIAL_NO = '01'.
it_BAPIESKLC-PERCENTAGE = '100'.
it_BAPIESKLC-QUANTITY = 2.
APPEND IT_BAPIESKLC.
CLEAR IT_BAPIESKLC.
it_BAPIESKLC-PCKG_NO = v_packno + 1.
it_BAPIESKLC-LINE_NO = '0000000003'.
it_BAPIESKLC-SERNO_LINE = '01'.
it_BAPIESKLC-SERIAL_NO = '01'.
it_BAPIESKLC-PERCENTAGE = '100'.
it_BAPIESKLC-QUANTITY = 2.
APPEND IT_BAPIESKLC.
CLEAR IT_BAPIESKLC.
CALL FUNCTION 'BAPI_REQUISITION_CREATE' IMPORTING
NUMBER = REQ_NO
TABLES
REQUISITION_ITEMS = it_BAPIEBANC
REQUISITION_ACCOUNT_ASSIGNMENT = it_BAPIEBKN
REQUISITION_SERVICES = IT_BAPIESLLC
REQUISITION_SRV_ACCASS_VALUES = it_BAPIESKLC
RETURN = IT_BAPIRETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Thnx and Regards
Ebrahim