‎2007 Jul 24 12:32 PM
HI Experts,
Can anyone plz. tell me the the process to use the Bapi for Bill/Invoice Creation.
Bapi is<b> BAPI_BILLINGDOC_CREATEMULTIPLE</b>.
Actually i want to know the coding for passing the values in this BAPI. What exactly i have to code to get the billing done using this BAPI.
Also , i want to know whether all those messages will come using this BAPI what comes using VF01 TCode while creating a Bill.
Plz. reply as soon as possible. Its Urgent.
Thanks in Advance .
Regards,
Rahul
‎2007 Jul 24 12:38 PM
Hi
U can try this:
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
EXPORTING
POSTING = ''
TABLES
BILLINGDATAIN = TI_BILLINGDATAIN
ERRORS = TI_ERRORS
RETURN = TI_RETURN2
SUCCESS = TI_SUCCESS.
Check error
LOOP AT TI_RETURN WHERE TYPE = 'E' OR
TYPE = 'A'.
EXIT.
ENDLOOP.
IF SY-SUBRC <> 0.
REFRESH TI_RETURN2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = TI_RETURN2.
Check error
LOOP AT TI_RETURN WHERE TYPE = 'E' OR
TYPE = 'A'.
EXIT.
ENDLOOP.
IF SY-SUBRC <> 0.
Search the bill
SELECT SINGLE VBELN
INTO W_FACTURA
FROM VBFA
WHERE VBELV = W_PEDIDO.
ENDIF.
ENDIF.
<b>Reward points</b>
Regards