‎2008 Dec 13 8:45 PM
Hi Experts,
I have a field MATNR at Header level(say) and a table control below say with > 1 rows for line items
and few columns in which MATNR is one of them.
I had written code for pressing ENTER at header level which has sy-ucomm as space.
Now for item level (in tab control) also sy-ucomm = space.
I want to assign different func codes to the MATNR field at Header level and in item level (in table control).
This is because when i press enter key the same code triggers at header level or even at table control level
in PAI. The same logic triggers in both cases and gives me wrong result.
How do i handle this if not?
Pls suggest.
‎2008 Dec 14 6:00 PM
Hi
For table control you can use chan endchain so inthis case when you make any changes in the table control then for the fields which have been used inside chain endchain MODULE modify_Control will get triggered.
PAI
*module for Header*
FIELD WA_MATNR Module Change_Header ON INPUT
*Table Control*
Loop at i_tab.
CHAIN.
FIELD wa_itab-matnr.
MODULE modify_Control ON CHAIN-REQUEST.
ENDCHAIN.
Endlopp.
Hope that will solve the problem.
Neha
‎2008 Dec 14 6:00 PM
Hi
For table control you can use chan endchain so inthis case when you make any changes in the table control then for the fields which have been used inside chain endchain MODULE modify_Control will get triggered.
PAI
*module for Header*
FIELD WA_MATNR Module Change_Header ON INPUT
*Table Control*
Loop at i_tab.
CHAIN.
FIELD wa_itab-matnr.
MODULE modify_Control ON CHAIN-REQUEST.
ENDCHAIN.
Endlopp.
Hope that will solve the problem.
Neha
‎2008 Dec 15 2:14 AM
Hi Neha Shukla,
What exactly should i write in MODULE modify_Control?
FIELD WA_MATNR Module Change_Header ON INPUT --> isn't it ON CHANGE here?
Thanks
Dan
‎2008 Dec 15 3:06 AM
Hi
This Module will be called as soon as you change the value or enter the value in header field Matnr.
As you have mentioned in your case that when you change the value or enter the value then you execute some piece of code using sy-ucomm = space so instead of using sy-ucomm = space
when u enter some value in your header field than this module will be called you save this screen field in some z table or you save it in a temp table or you can validate it ,I mean it`s up to you how do you handle this.
I have suggested to use this instead of sy-ucomm = space.
Neha
‎2009 Mar 05 3:49 AM
Not possible with text box.
need to provide drop down and assign a func code