2006 Nov 02 2:36 PM
Hi gURUS,
i have 4 columns in table control
matnr , quantity, meins , plant.
i enter the values for
material , quantity , meins and plant in table control and hit enter.
My code is like this.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
in module testm_matnr i have the following code.
data : testm like mara-matnr.
select single matnr in testm from mara
where matnr = itab-matnr .
if testm is initial.
mESSAGE E999 WITH Itab-MATNR 'Material Doesnot exist'.
endif.
in module testk_werks i have the following code.
data : test like marc-matnr.
select single matnr in test from marc
where matnr = itab-matnr
and marc = itab-marc.
if test is initial.
mESSAGE E999 WITH Itab-MATNR 'Material Doesnot belon to plant'
itab-marc.
endif.
My question is,
1) I have entered all the four values , if the material is wrong then
i can input only matnr since i don't chain and chain.
let says i have entered a correct material but the PLANT is wrong.
Now the plant is available for input.
But NOW IF I DECIDE TO CHANGE THE MATERIAL INSTEAD OF PLANT I CANNOT BECAUSE I AM ABLE TO INPUT ONLY THE PLANT FIELD.
SO I HAD THE CHAIN AND ENDCHAIN
CHAIN.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
ENDCHAIN.
I entered all the values and hit enter
NOW THE ISSUE IS WHEN MY MATERIAL IS WRONG I DON'T SEE ANY VALUES FOR
QUAN , MEINS , WERKS.
My requirement is
I input all values when some thing is wrong i should be able to change whichever field i want and at the same i need to retain the previous values.
I SHOULD BE ABLE TO TO INPUT ALL FIELDS AND AT THE SAME TIME I SHOULD BE ABLE TO RETAIN THE VALUES OF OTHER FIELD AS WELL.
I TRIED THIS WAY BUT IT DIDNOT WORKED FOR ME.
CHAIN.
FIELD Itab-MATNR.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks.
ENDCHAIN.
CHAIN.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
ENDCHAIN.
Hi gURUS,
i have 4 columns in table control
matnr , quantity, meins , plant.
i enter the values for
material , quantity , meins and plant in table control and hit enter.
My code is like this.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
in module testm_matnr i have the following code.
data : testm like mara-matnr.
select single matnr in testm from mara
where matnr = itab-matnr .
if testm is initial.
mESSAGE E999 WITH Itab-MATNR 'Material Doesnot exist'.
endif.
in module testk_werks i have the following code.
data : test like marc-matnr.
select single matnr in test from marc
where matnr = itab-matnr
and marc = itab-marc.
if test is initial.
mESSAGE E999 WITH Itab-MATNR 'Material Doesnot belon to plant'
itab-marc.
endif.
My question is,
1) I have entered all the four values , if the material is wrong then
i can input only matnr since i don't chain and chain.
let says i have entered a correct material but the PLANT is wrong.
Now the plant is available for input.
But NOW IF I DECIDE TO CHANGE THE MATERIAL INSTEAD OF PLANT I CANNOT BECAUSE I AM ABLE TO INPUT ONLY THE PLANT FIELD.
SO I HAD THE CHAIN AND ENDCHAIN
CHAIN.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
ENDCHAIN.
I entered all the values and hit enter
NOW THE ISSUE IS WHEN MY MATERIAL IS WRONG I DON'T SEE ANY VALUES FOR
QUAN , MEINS , WERKS.
My requirement is
I input all values when some thing is wrong i should be able to change whichever field i want and at the same i need to retain the previous values.
I SHOULD BE ABLE TO TO INPUT ALL FIELDS AND AT THE SAME TIME I SHOULD BE ABLE TO RETAIN THE VALUES OF OTHER FIELD AS WELL.
I TRIED THIS WAY BUT IT DIDNOT WORKED FOR ME.
CHAIN.
FIELD Itab-MATNR.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks.
ENDCHAIN.
CHAIN.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
ENDCHAIN.
2006 Nov 02 2:46 PM
2006 Nov 02 2:47 PM
hi preeti,
chain.
FIELD Itab-MATNR module testm_matnr.
FIELD Itab-quan.
FIELD Itab-meins.
FIELD Itab-werks MODULE testK_werks.
endchain .
do this way only u r doing right ..
double click on testm_matnr ..
it will give u a module .
in that place the code ..
it will work .
check this program
<b>
DEMO_DYNPRO_FIELD_CHAIN</b>
regards,
Vijay
2006 Nov 02 2:48 PM
hi,
i think tht's not sufficient.
pls use
chain.
...
FIELD Itab-werks MODULE testK_werks <b>on chain-input.</b>
endchain.A.