‎2007 Jan 23 5:15 PM
Hi all,
I am looking for the way to pass to the bapi in object the Header Texts for Purchase Requisition.
Did anyone else have my same problem? Do you have any suggest for me?
Thanks Regards
‎2007 Jan 23 5:20 PM
Hi
The requisition hasn't an header table so you can try to transfer the text without assigning the item number.
Max
‎2007 Jan 23 5:22 PM
Hi,
You can use the parameter REQUISITION_ITEM_TEXT to pass the text..
REQUISITION_ITEM_TEXT STRUCTURE BAPIEBANTX
In that don't populate PREQ_ITEM.Just populate the requisition number PREQ_NO.
Hope this helps..
Thanks,
Naren
‎2007 Jan 23 5:22 PM
Hi,
You can use FM SAVE_TEXT to save PR's header text after BAPI_REQUISITION_CREATE was committed.
...
CLEAR HEADER.
HEADER-TDOBJECT = 'EBANH'.
HEADER-TDNAME = '0010000000'
HEADER-TDID = 'B01'.
HEADER-TDSPRAS = SY-LANGU.
CLEAR I_LINES.
REFRESH I_LINES.
I_LINES-TDFORMAT = '*'.
I_LINES-TDLINE = 'INSERT HEADER DATA'.
APPEND I_LINES.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = HEADER
SAVEMODE_DIRECT = 'X'
IMPORTING
NEWHEADER = HEADER
TABLES
LINES = I_LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ferry Lianto
‎2007 Jan 23 5:42 PM
Ferry is correct, you will have to use SAVE_TEXT fm. You cannot insert the header text using the BAPI.