‎2009 Jul 22 3:30 PM
Hi all,
Working on some BAPI, using *BAPISALESDOCUMENT_COPY_ i am creating the sub-engagement(VBELN) with reference to some standard engagement(VGBEL), after this have to creat the header and item details for the sub-engagement using BAPI *BAPISALESORDER_CHANGE,_ upto this no issues.
After creating this some data will be maintained in an Excel sheet for Additional data for the sub-engagement. To create this also i have to use the same BAPI *BAPISALESORDER_CHANGE*,_ When using this getting some problem like the data that has been created earlier been overwritten with the new data.
Please help me out in this regard. I have to create the sub-engagement with all core details and Additional details.
Regards,
C.Bharath Kumar
‎2009 Jul 23 8:20 AM
Hi Bharat,
Nice to hear from u back again...
Only specify fields that should be changed.
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the Checkboxes
ORDER_HEADER_INX fulfills the following two tasks:
Controls processing functions with the value in the UPDATEFLAG field (change indicator).
The following entries are available:
' ' : Create a new sales document
I: Create a new sales document
U: Change an existing sales document
😧 Delete an existing sales document
Controls the field entry with checkboxes
If the UPDATEFLAG field has been activated, the system only copies those fields from the SALES_HEADER_IN parameter that have been activated with 'X'.
For more information, please refer to the documenation of this FM (BAPI)
Regards,
Aditya(LNT)
‎2009 Jul 23 8:15 AM
dear
Please check whether BAPISDH1X-UPDATEFLAG field in export parameter of BAPI is set to 'I' for insert.
same for other X structures in table parameters.
cheers
‎2009 Jul 23 8:20 AM
Hi Bharat,
Nice to hear from u back again...
Only specify fields that should be changed.
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the Checkboxes
ORDER_HEADER_INX fulfills the following two tasks:
Controls processing functions with the value in the UPDATEFLAG field (change indicator).
The following entries are available:
' ' : Create a new sales document
I: Create a new sales document
U: Change an existing sales document
😧 Delete an existing sales document
Controls the field entry with checkboxes
If the UPDATEFLAG field has been activated, the system only copies those fields from the SALES_HEADER_IN parameter that have been activated with 'X'.
For more information, please refer to the documenation of this FM (BAPI)
Regards,
Aditya(LNT)
‎2009 Jul 27 8:04 AM
Hi Aditya,
Thanks for your solution, still facing some problem in updating the salesorder created in using BAPI *BAPISALESORDER_CREATEFROMDAT2*_, probelm is given below.
I am creating an salesorder using the above given BAPI, and have a requirement to change the salesorder which is created with some additional data using the BAPI *BAPISALESDOCUMENT_CHANGE*_,
When i am trying to change the sales order its not updating the same record instead creating a new record in VBAP table with some new POSNR value. I am passing the value for update flag as 'U', then also its creating a new record.
If this issue is solved then my whole object is done please help me out in this regard.
Regards,
C.Bharath Kumar
‎2009 Jul 28 8:39 AM