Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

VA01 bdc issue

shishupalreddy
Active Contributor
0 Likes
833

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

8 REPLIES 8
Read only

Former Member
0 Likes
803

Can you show your code.

Regards,

Atish

Read only

Former Member
0 Likes
803

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

Read only

0 Likes
803

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

Read only

0 Likes
803

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

Read only

0 Likes
803

Hi Eshwar,

Can you please explain the process more clearly ...how to use BAPI for sales order item level changes

regards

Read only

Former Member
0 Likes
803

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,

Read only

0 Likes
803

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

Read only

0 Likes
803

Hi There

I am having the same issue described above, did you get the solution for it???

Regards

Geoff.