Application Development 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: 

Call Transaction 'VL02N'-Issue

Former Member
0 Kudos

Hi friends ,

I am trying to do PGI (post goods isssue) through the transaction 'Vl02n'.Here i am using call transaction statement twice coz in the first case ,am trying to save the delivery with new posting date and 2nd to do PGI .

So when i execute the BDC ,its giving me error that transaction is locked with my user id .I dont know exactly whats happening inside ,is it because i am using call transaction statement twice ???

Strange thing is ,when i see the same in the debug mode ,its executing normally,i mean i am able to post goods issue.

does anyone have any idea on how to fix this??

Regards

Nugur .

7 REPLIES 7

Former Member
0 Kudos

Hi

once u call transaction VL02n , it gets locked in your user id.

so after ur first call transaction ,

call function "dequeue all" . so it gets unlocked.

then call your 2nd call transaction ..

regards,

Ramya

Former Member
0 Kudos

Hi

You can try this option.

The second call transaction put inside a sub-routine and than call the sub-routine on commit.

For example : Perform pgi on commit.

Regards

Madhan D

Former Member
0 Kudos

Hi Ramya ,

wht value shall i pass into the FM dequeue_all ,i mean for the parameter _SYNCHRON ,is it X or blank???

0 Kudos

just use CALL FUNCTION 'DEQUEUE_ALL'.

regards,

Ramya

Former Member
0 Kudos

................

PERFORM bdc_dynpro USING c_sapmv50a c_2000.

PERFORM bdc_field USING c_bdc_okcode

c_sich_t.

CALL TRANSACTION c_vl02n USING ig_bdcdata MODE c_n

UPDATE c_s MESSAGES INTO ig_messtab. "#EC CI_CALLTA

COMMIT WORK.

PERFORM error_handling.

ENDIF.

ENDLOOP.

For PGI

LOOP AT ig_ship_info INTO wg_ship_info.

IF l_vbeln NE wg_ship_info-delno.

PERFORM bdc_dynpro USING c_sapmv50a c_4004.

PERFORM bdc_field USING c_bdc_cursor

c_likp_vbeln.

PERFORM bdc_field USING c_bdc_okcode

c_wabu_t.

PERFORM bdc_field USING c_likp_vbeln

wg_ship_info-delno.

PERFORM bdc_dynpro USING c_sapmv50a c_4004.

PERFORM bdc_field USING c_bdc_okcode

c_ebacke_t.

PERFORM bdc_field USING c_bdc_cursor

c_likp_vbeln.

CALL TRANSACTION c_vl02n USING ig_bdcdata

MODE c_n

UPDATE c_s

MESSAGES INTO ig_messtab."#EC CI_CALLTA

COMMIT WORK.

PERFORM error_handling.

ENDIF.

MOVE wg_ship_info-delno TO l_vbeln.

REFRESH : ig_bdcdata, ig_messtab.

ENDLOOP.

Former Member
0 Kudos

Use update mode as 'Synchronous' for first BDC.

If the problem still persists after first BDC use ' wait upto 2 seconds. ' statement and then proceed for second BDC.

Just increase the time if the problem still there.

Former Member
0 Kudos

Hi All ,

One more concern regarding this issue is ,its saying Replenishment order saved succesfully .I guess this comes after doing the PGI ,its a system generated message ,which goes into the BDCMSGCOLL.I am not capturing this message anywhere .

Do we need to use wait statement even after the second call transaction ??? to avoid this message ??

Thanks.