2006 Jul 26 12:33 PM
hi
all
Plz look at this code
i m trying to loop at VBFA table and Read VBUk table
actually i have to found the open delivery .so i m looping on table T_VBPA_TAB (bcoz for 1 order there may be multiple Delivery) and check VBTYP_N eq 'J'in T_VBFA
.now read T_VBUK to find WBSTK and get open quantity .
But it gives wrong result..my logic is correct but what i
have to put for corresponding cases.
Plz check it.
Loop at T_VBPA_tab
Loop at T_VBFA where vbelv eq T_VBPA_tab-vbeln
and posnv eq T_VBPA_tab-posnr
and vbtyp_n eq 'J' .
Read T_VBUK with key vbeln eq T_VBFA-vbeln
if sy-subrc eq 0.
case t_vbuk-wbstk.
when c_a .
w_open_qty = t_vbfa-rfmng + w_open_qty.
when c_b .
w_open_qty =T_VBAP-kwmeng - t_vbfa-rfmng+w_open_qty
when c_c.
w_open_qty = '0.000' + w_open_qty .
endcase.
endloop.
if sy-subrc ne 0.
w_open_qty = hldmatl-kwmeng.
write : W_OPEN_QTY.
endloop.
Thanks
Saurabh
hi
all
Plz look at this code
i m trying to loop at VBFA table and Read VBUk table
actually i have to found the open delivery .so i m looping on table T_VBPA_TAB (bcoz for 1 order there may be multiple Delivery) and check VBTYP_N eq 'J'in T_VBFA
.now read T_VBUK to find WBSTK and get open quantity .
But it gives wrong result..my logic is correct but what i
have to put for corresponding cases.
Plz check it.
Loop at T_VBPA_tab
Loop at T_VBFA where vbelv eq T_VBPA_tab-vbeln
and posnv eq T_VBPA_tab-posnr
and vbtyp_n eq 'J' .
Read T_VBUK with key vbeln eq T_VBFA-vbeln
if sy-subrc eq 0.
case t_vbuk-wbstk.
when c_a .
w_open_qty = t_vbfa-rfmng + w_open_qty.
when c_b .
w_open_qty =T_VBAP-kwmeng - t_vbfa-rfmng+w_open_qty
when c_c.
w_open_qty = '0.000' + w_open_qty .
endcase.
endloop.
if sy-subrc ne 0.
w_open_qty = hldmatl-kwmeng.
write : W_OPEN_QTY.
endloop.
Thanks
Saurabh
2006 Jul 26 12:38 PM
Hi Tiwari ,
check ur values with VA05 and table entries of KUNNR In S066/67.
Regards
Prabhu
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |