‎2006 Sep 04 6:17 AM
Hi all,
i am using bapi_salesorder_createfromdat2.
i am having flat file like 1 header and 3 line items like
<---header
doc_num doc_type........item material
1 TA 10 100-500
1 TA 20 100-501
1 TA 30 100-502
2 TA 10 100-500
2 TA 20 100-502
..
......
i want to display only one message either creted or not created a sales document in a flat file.
i have created and internal with structure flat file and one extra field for Status.
help me out please.
‎2006 Sep 04 6:20 AM
Hi
The Bapi function which you are using will have return variable or internal table which will have the sales order number if successfully created and errors if any ..
Using the table or variable you can update the status of the flat file and display.
‎2006 Sep 04 6:20 AM
Hi
The Bapi function which you are using will have return variable or internal table which will have the sales order number if successfully created and errors if any ..
Using the table or variable you can update the status of the flat file and display.
‎2006 Sep 04 6:37 AM
One of the tables parameter is 'RETURN'.
So
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT'
importing
....
exporting
....
tables
return = t_return.
read table t_return with key type = 'E'.
if sy-subrc eq 0.
write: 'Sales order was not created'.
else.
write: 'Sales document created'.
endif.
Message was edited by: Sharath kumar R