2008 Feb 15 1:58 AM
Hi ,
MY requriement is as follows .
I have to add one line item for sales order depending on the the net quatity avaialbe .
I am implementing the same within UserExit , but it is giving always UPDATE WAS TERMINATED BY USER XXXXXX .
Anyhelp on this
thanks
Hi ,
MY requriement is as follows .
I have to add one line item for sales order depending on the the net quatity avaialbe .
I am implementing the same within UserExit , but it is giving always UPDATE WAS TERMINATED BY USER XXXXXX .
Anyhelp on this
thanks
2008 Feb 15 2:00 AM
2008 Feb 15 2:35 AM
Incase you are using statements related to COMMIT WORK, comment the same and try again.
Btw, as per my understanding you upload sales orders using BDC and internally via user exit you add additional line items based on available qty right, am i right?
Regards
Eswar
2008 Feb 15 2:43 AM
Hi Eswar ,
Exactly the same i am trying to do ...i will check the Qty and then i have to add additional line item .
Your help is appreciated .
thanks
2008 Feb 15 3:15 AM
Hi,
Do you need to add line items only for the orders that you upload via your BDC or even for the Orders that are created online???
If the logic is applicable only for the orders that are created via your BDC, i would advice you to use BAPI's Instead as below:
1. Pass your data to BAPI: BAPI_SALESORDER_SIMULATE, you will get the details of all items, schedule lines and even conditions if required.
2. Now manipulate items as you need and use the same for FM: BAPI_SALESORDER_CREATEFROMDAT2.
Using the above method you can avoid using User-Exit and you can have more transparency of the process.
Or if you got to do with BDC, maybe you can use FM: BAPI_MATERIAL_AVAILABILITY to check the quantities within your program, determine the line items and use them in your BDC.
Kind Regards
Eswar
2008 Feb 18 1:32 AM
Hi Eshwar,
Can you please explain the process more clearly ...how to use BAPI for sales order item level changes
regards
2008 Feb 18 3:28 PM
Hi ,
First you need to check what is the exact problem in getting express document (UPDATE Termination), for this please use
SM13 transaction code, from this you can check easily what is the problem, then we can go for implementation part.
Thanks,
2008 Feb 19 2:33 AM
hI ,
Can you please have a look at my code and let me know where i am making mistake in BDCDATA population .
REFRESH bdcdata.
REFRESH l_t_msg.
CLEAR bdcdata.
bdcdata-program = 'SAPMV45A'.
bdcdata-dynpro = '0102'.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_CURSOR' .
bdcdata-fval = 'VBAK-VBELN'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_OKCODE' .
bdcdata-fval = '/00'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'VBAK-VBELN'.
bdcdata-fval = l_t_final-vbeln.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-program = 'SAPMV45A'.
bdcdata-dynpro = '4001'.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_OKCODE' .
bdcdata-fval = '/00'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'KUAGV-KUNNR' .
bdcdata-fval = xvbak-kunnr.
APPEND bdcdata.
CONCATENATE 'VBAP-VSTEL' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_CURSOR' .
bdcdata-fval = fld.
APPEND bdcdata.
CONCATENATE 'RV45A-MABNR' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = fld.
bdcdata-fval = l_t_final-matnr.
APPEND bdcdata.
CONCATENATE 'RV45A-KWMENG' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = fld.
bdcdata-fval = l_t_final-kwmeng.
APPEND bdcdata.
CONCATENATE 'KOMV-KBETR' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = fld.
bdcdata-fval = l_t_final-netwr.
APPEND bdcdata.
CONCATENATE 'VBAP-VSTEL' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = fld."
bdcdata-fval = l_t_final-vstel.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-program = 'SAPMV45A'.
bdcdata-dynpro = '4001'.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_OKCODE' .
bdcdata-fval = '/00'.
APPEND bdcdata.
CONCATENATE 'VBAP-UEPOS' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_CURSOR' .
bdcdata-fval = fld.
APPEND bdcdata.
CONCATENATE 'VBAP-UEPOS' '(' l_f_line ')' INTO fld.
CLEAR bdcdata.
bdcdata-fnam = fld."
bdcdata-fval = l_t_final-uepos.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-program = 'SAPMV45A'.
bdcdata-dynpro = '4001'.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_OKCODE' .
bdcdata-fval = '=SICH'.
APPEND bdcdata.
CALL FUNCTION 'DEQUEUE_ALL'
EXPORTING
_SYNCHRON = ' '
.
DATA:l_f_mode(1) TYPE c.
l_f_mode = 'N'.
CALL TRANSACTION 'VA02' USING bdcdata
MODE l_f_mode
UPDATE 'S'
MESSAGES INTO l_t_msg.
The same is working fine when i run in foreground , but not in background .
Urgent !!!!!
thanks
Edited by: shishupalreddy ramreddy on Feb 18, 2008 9:33 PM
2008 Sep 16 1:42 PM
Hi There
I am having the same issue described above, did you get the solution for it???
Regards
Geoff.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |