‎2007 Jun 25 3:00 PM
Hi all,
I am workng on FM. I am using 2 structures to get the output data.
When i am testing FM, data is gettting in 1 strcuture. But Second Structure not poplating in output. How can i do that.
regards,AJAy Ram
‎2007 Jun 25 3:04 PM
hi
just check
if there is structure mismatch
if no check if ur using corresponding fields of
after then check if there exist entries for the second structure corresponding to first one
regards
ravish
<b>plz dont forget to reward points if helpful</b>
‎2007 Jun 25 3:04 PM
hi
just check
if there is structure mismatch
if no check if ur using corresponding fields of
after then check if there exist entries for the second structure corresponding to first one
regards
ravish
<b>plz dont forget to reward points if helpful</b>
‎2007 Jun 25 3:05 PM
Hello Ajay,
Could you please post your code so we can see where the error is?
Regards,
Walter
‎2007 Jun 25 3:17 PM
Here i am giving my code.
APPEND VISUAL_PARTS.----
> First Structure
CLEAR VISUAL_PARTS.
Move Inventory for the above material.
if werks+1(1) = '8'.
if werks = '1802'.
if lw_lgort <> 'T001'.
INVENTORY_MAT-matnr = matnr.
INVENTORY_MAT-werks = werks.
INVENTORY_MAT-lgort = lw_lgort.
********Get the Total Stock of the material*************
perform inventory_mat using matnr werks lw_lgort changing w_labst.
INVENTORY_MAT-LABST = w_labst.
APPEND INVENTORY_MAT.----
> Second Strcuctrure
CLEAR INVENTORY_MAT.
endif.
else.
if lw_lgort0(1) = 'M' or lw_lgort0(1) = 'G'
or lw_lgort+0(1) = 'H'.
INVENTORY_MAT-matnr = matnr.
INVENTORY_MAT-werks = werks.
INVENTORY_MAT-lgort = lw_lgort.
********Get the Total Stock of the material*************
perform inventory_mat using matnr werks lw_lgort changing w_labst.
INVENTORY_MAT-LABST = w_labst.
APPEND INVENTORY_MAT.
CLEAR INVENTORY_MAT.
endif.
endif.
endif.
FORM inventory_mat USING P_MARNR
P_WERKS
P_LGORT
CHANGING P_LABST.
clear lw_labst.
select single labst into lw_labst
from mard
where matnr = P_MARNR
and werks = P_WERKS
and lgort = P_LGORT.
if sy-subrc = 0.
P_LABST = lw_labst.
endif.
ENDFORM. " inventory_mat
Please help me in this.
Will give reward points.
regards,AjayRam
‎2007 Jun 25 3:30 PM
Hello Walter,
Did you check my code.
Rewards will be given if helpful answers.
regards,
Ajay Ram
‎2007 Jun 25 3:34 PM
Hello,
Did you try to debug your FM and see if your second structure is filled?
Maybe it's the IF condition that isn't correct : if werks+1(1) = '8'.