09-06-2005 2:41 AM
just want to ask why the the code below unable to pass the value of wa_tbl_li-i_qty to MSEG-ERFMG(0)? what is the problem in my code?
*************************************
data: begin of i_tble_li occurs 0,
matnr like mseg-matnr,
i_qty type i,
werks like mseg-werks,
end of i_tble_li.
loop at i_tble_li.
wa_tbl_li = i_tble_li.
PERFORM bdc_dynpro USING 'SAPMM07M' '0421'.
PERFORM bdc_field USING:
'bdc_cursor' 'MSEG-ERFMG(01)',
'bdc_okcode' '/00',
'MSEGK-KONTO' i_tble_hdr-konto,
'MSEG-MATNR(01)' wa_tbl_li-matnr,
'MSEG-ERFMG(01)' wa_tbl_li-i_qty,
'MSEG-LGORT(01)' i_tble_hdr-lgort,
'MSEG-WERKS(01)' wa_tbl_li-werks,
'bdc_subscr' 'SAPMM07M',
'bdc_subscr' 'SAPLKACB'.
endloop.
09-06-2005 2:47 AM
Hi Donna,
What is the definition of WA_TBL_LI-QTY?
It looks to me like I_TBLE_LI has a header line.
Instead of using WA_TBL_LI, use I_TBLE_LI as parameters to your subroutine. ie
PERFORM bdc_field USING:
'bdc_cursor' 'MSEG-ERFMG(01)',
'bdc_okcode' '/00',
'MSEGK-KONTO' i_tble_hdr-konto,
<b>'MSEG-MATNR(01)' i_tble_li-matnr,
'MSEG-ERFMG(01)' i_tble_li-i_qty,</b>
'MSEG-LGORT(01)' i_tble_hdr-lgort,
<b>'MSEG-WERKS(01)' i_tble_li-werks,</b>
'bdc_subscr' 'SAPMM07M',
'bdc_subscr' 'SAPLKACB'.
Cheers,
Pat.
09-06-2005 2:47 AM
Hi Donna,
What is the definition of WA_TBL_LI-QTY?
It looks to me like I_TBLE_LI has a header line.
Instead of using WA_TBL_LI, use I_TBLE_LI as parameters to your subroutine. ie
PERFORM bdc_field USING:
'bdc_cursor' 'MSEG-ERFMG(01)',
'bdc_okcode' '/00',
'MSEGK-KONTO' i_tble_hdr-konto,
<b>'MSEG-MATNR(01)' i_tble_li-matnr,
'MSEG-ERFMG(01)' i_tble_li-i_qty,</b>
'MSEG-LGORT(01)' i_tble_hdr-lgort,
<b>'MSEG-WERKS(01)' i_tble_li-werks,</b>
'bdc_subscr' 'SAPMM07M',
'bdc_subscr' 'SAPLKACB'.
Cheers,
Pat.
09-06-2005 2:50 AM
seems like ur code is right..
wat is the value of wa_tbl_li-i_qty.
regards
gv
09-06-2005 3:54 AM
09-06-2005 5:16 AM
Hi,
Set the break point and check the value for
wa_tbl_li-i_qty, it is like 10.00 EA or 10.00
if it is 10.00 EA you make it like
wa_tbl_li-i_qty = wa_tbl_li-i_qty+0(15)
Cheers,
Sasi