Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CHAIN END CHAIN IN MODULE POOL

Former Member
0 Likes
624

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.

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
584

Not sure why you are not able to see previous values, but try coding like this.

CHAIN.
   FIELD: Itab-MATNR , Itab-quan,
          Itab-meins,  itab-werks.
   MODULE TEST_ALL_FIELDS.
ENDCHAIN

.

Code a new MODULE which will check all of the fields in sequence.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
584

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

Read only

andreas_mann3
Active Contributor
0 Likes
584

hi,

i think tht's not sufficient.

pls use 

chain.
...
FIELD Itab-werks MODULE testK_werks <b>on chain-input.</b>
endchain.

A.