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

peculiar problem with table control

Former Member
0 Likes
656

Hi all,

IAM HAVING A PECULIAR PROBLEM.

I HAVE A TABLE CONTROL IN ONE OF MY SCREEN.

i AM COPYING DATA FROM ZTABLE .

***PAI

loop.

CHAIN.

FIELD ZTEST-MATNR MODULE CHECK_MATNR_9002.

FIELD ZTEST-MAKTX MODULE CHECK_MAKTX_9002.

FIELD ZTEST-QUANTITY MODULE CHECK_QUANTITY_9002.

ENDCHAIN.

ENDLOOP.

MODULE CHECK_MATNR_9002 INPUT.

DATA : TEST1 LIKE MARA-MATNR.

IF NOT ZTEST-MATNR IS INITIAL.

CLEAR TEST1.

SELECT SINGLE MATNR INTO TEST1 FROM MARA

WHERE MATNR = ZTEST-MATNR.

IF TEST1 IS INITIAL.

MESSAGE E123(00) WITH ' Material Doesnot Exist'.

ENDIF.

ENDIF.

ENDMODULE. " CHECK_MATNR1_9002 INPUT

IAM COPYING DATA FROM ZTABLE.

WHEN I PRESS ENTER CONTROL COMES TO PAI.

IF TEST1 IS INITIAL I LOOSE THE QUANTITY AND MAKTX.

WHEN I COME TO FILED FOR MATNR.ITS THEN ZTEST MATNR HAS VALUE AT THIS POINT OF TIME

ZTEST-MAKTX AND ZTEST-QUANTITY IS EMPTY.

AFTER SUCCESFUL COMPLETION OF FIELD FOR MATNR. THE CONTROL COMES TO FIELD-MAKTX,ITS THEN I SEE VALUE FOR ZTEST-MAKTX AND NOW THE

ZTEST-QUANTITY IS EMPTY.

IF THE FIELD MAKTX IS SUCCESFUL THEN I SEE THE VALUE FOR ZTEST-QUANTITY.

SUPPOSE IF GET FOR WRONG ZTEST-MATNR IT GIVES ME AN ERROR SAYING

MATERIAL DOESNOT EXIST AND I DON'T SEE THE VALUE OF QUANTITY AND MAKTX.

PLEASE LET ME KNOW IF IAM MISSING A TRICK IN HERE.

THANKS

KAJOL

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
625

Hi,

If you using FIELD statement data is passed from screen fields once in each dialog step..

If you only use simple module calls, all of the data is transferred in the PAI event before PAI processing starts.

Check this documentation..

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbabb035c111d1829f0000e829fbfe/content.htm

Thanks,

Naren

5 REPLIES 5
Read only

Former Member
0 Likes
625

HI ALL

ANYTHOUGHTS ON THIS POST

THANKS

Read only

0 Likes
625

Hi ,

I think you didnot understand my problem.

Can you read it once again.

Hope iam clear.

Thanks

Kajol

Read only

Former Member
0 Likes
626

Hi,

If you using FIELD statement data is passed from screen fields once in each dialog step..

If you only use simple module calls, all of the data is transferred in the PAI event before PAI processing starts.

Check this documentation..

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbabb035c111d1829f0000e829fbfe/content.htm

Thanks,

Naren

Read only

Former Member
0 Likes
625

Hi,

I am sorry I am not able to understand your problem..Do you want to retain the values in the table control after the three fields are successfully checked..

THanks,

Naren

Read only

Former Member
0 Likes
625

Hi,

Are you selecting the MAKTX and QUANTITY based on MATNR from the Z-table. If so, when the MATNR is not valid, the MAKTX and QUANTITY might be getting cleared. You can change the code such that only when the MATNR is valid, the selection for MAKTX and QUANTITY happens.

Manoj