2024 Oct 16 12:02 PM - edited 2024 Oct 16 1:12 PM
Hello Gurus!!
Greetings !!
Having a problem. Using BDC record i need to complete PGI against Delivery order.
Problem is its skipping one line every time to updated data. I can not find out the problem.Sample code is given here as reference. Please help me to sort it out. Also item number not perfectly maintain which is given in the attachment even its take an extra line also.Its an urgent issue. Please help me.
LOOP AT it_lips INTO wa_lips.
indx = indx + 1.
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=POPO_T'.
PERFORM bdc_dynpro USING 'SAPMV50A' '0111'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV50A-POSNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV50A-POSNR'
wa_lips-posnr.
***WHEN ON Below code ONE LINE SKIP & SCROLL WORK PERFECTLY WITH UPDATED VALUES
****WHEN OFF ITS SCROLL WORKS PERFECTLY BUT DATA NOT UPDATED
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
DATA(txt_lg) = |LIPS-LGORT({ indx })|.
PERFORM bdc_field USING txt_lg
'0004'.
DATA(txt_dlqt) = |LIPSD-G_LFIMG({ indx })|.
txt_qt = wa_lips-lfimg.
PERFORM bdc_field USING txt_dlqt
txt_qt.
DATA(txt_pk) = |LIPSD-PIKMG({ indx })|.
PERFORM bdc_field USING txt_pk
txt_qt.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WABU_T'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LIPSD-PIKMG(01)'.
PERFORM bdc_transaction USING 'VL02N' 'A'.
Hello Gurus!!
Greetings !!
Having a problem. Using BDC record i need to complete PGI against Delivery order.
Problem is its skipping one line every time to updated data. I can not find out the problem.Sample code is given here as reference. Please help me to sort it out. Also item number not perfectly maintain which is given in the attachment even its take an extra line also.Its an urgent issue. Please help me.
LOOP AT it_lips INTO wa_lips.
indx = indx + 1.
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=POPO_T'.
PERFORM bdc_dynpro USING 'SAPMV50A' '0111'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV50A-POSNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV50A-POSNR'
wa_lips-posnr.
***WHEN ON Below code ONE LINE SKIP & SCROLL WORK PERFECTLY WITH UPDATED VALUES
****WHEN OFF ITS SCROLL WORKS PERFECTLY BUT DATA NOT UPDATED
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
DATA(txt_lg) = |LIPS-LGORT({ indx })|.
PERFORM bdc_field USING txt_lg
'0004'.
DATA(txt_dlqt) = |LIPSD-G_LFIMG({ indx })|.
txt_qt = wa_lips-lfimg.
PERFORM bdc_field USING txt_dlqt
txt_qt.
DATA(txt_pk) = |LIPSD-PIKMG({ indx })|.
PERFORM bdc_field USING txt_pk
txt_qt.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WABU_T'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LIPSD-PIKMG(01)'.
PERFORM bdc_transaction USING 'VL02N' 'A'.
2024 Oct 16 12:07 PM
Could you please embed the screenshots instead of hyperlinks? Note that Batch Input (BDC has been obsolete for 20 years) doesn't permit to scroll, instead you must use any function code which permits to reposition (scroll) the table control (it depends on the transaction code and screen). At last resort, you may extend the standard to permit this feature and use it via Batch Input.
2024 Oct 16 1:18 PM
@Sandra_Rossi Please check now. Scroll is working but it skip one line . In internal table i got all the values without interval.
@Dominik_Tylczynski I create a BAPI for doing it automatically using API.
2024 Oct 16 1:44 PM
You are positioning the item number 00020 at the line 1. At the next item number, you are positioning it again at the line 1.
So, you should ALWAYS refer to LIPS-LGORT(1), LIPSD-G_LFIMG(1), LIPSD-PIKMG(1).
Is that clear?
2024 Oct 16 1:12 PM
Hello @hossain_rajib55
Why don't you use WS_DELIVERY_UPDATE function or Delivery Interface to update picking quantities and post GI? It's documented, supported, much easier than error prone BDC.
Best regards
Dominik Tylczynski
2024 Oct 16 1:36 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |