‎2009 May 28 12:59 PM
Hi,
I have a requirement on Goods Receipt/Reversal.Currently the existing program display header and Item level data(ex:10 line items) for selected shipment number.
My requirement is need to add new field (i.e date field )on header level which shoud be editable.When the user enter the date and user may select few line item(ex:3 line items) and when he click on SAVE button ,it shoud display the selected items only in item level.
Please Help me to solve this Issue.
‎2009 May 28 5:49 PM
Hello Reddyne,
First of all Welcome to SDN.
1. Select the table control then-> select status from help(in Menubar)-> double click on the screen number appearing there.
2. It opens the flowlogic screen-> now click on Layout Push button.
3. In layout check the attribute of the table control
towards the bottom of the Attribute screen there is a parameter w\selection _________ .
4. this is the parameter which is marked 'X' when you select a item in the screen.
Now in PAI
1. within the loop endloop.
add this code to get the selected header details.
LOOP AT itab WITH CONTROL tbcl.
MODULE check_selected_item.
ENDLOOP.
-
MODULE check_selected_item.
IF <w\selection> = 'X'.
MOVE tbcl to wa.
append wa to itab1.
ENDIF.
ENDMODULE.
-
Now you can fetch the item details based on the contents of itab1 i.e selected items for header.
Hope this discussion would be really helpful to you.
Cheers,
Suvendu
‎2009 May 28 5:49 PM
Hello Reddyne,
First of all Welcome to SDN.
1. Select the table control then-> select status from help(in Menubar)-> double click on the screen number appearing there.
2. It opens the flowlogic screen-> now click on Layout Push button.
3. In layout check the attribute of the table control
towards the bottom of the Attribute screen there is a parameter w\selection _________ .
4. this is the parameter which is marked 'X' when you select a item in the screen.
Now in PAI
1. within the loop endloop.
add this code to get the selected header details.
LOOP AT itab WITH CONTROL tbcl.
MODULE check_selected_item.
ENDLOOP.
-
MODULE check_selected_item.
IF <w\selection> = 'X'.
MOVE tbcl to wa.
append wa to itab1.
ENDIF.
ENDMODULE.
-
Now you can fetch the item details based on the contents of itab1 i.e selected items for header.
Hope this discussion would be really helpful to you.
Cheers,
Suvendu
‎2009 May 29 4:27 AM
hi.
To select a item in Table control , We have enable the select button .
go to table control properties , w/sel : give field name in Internal table which is of char 1.
when the user selected the line and PAI is trigged.
loop with itab.
endloop.
will run.
inside a loop call module.
check for 'x' in the field if it is 'x' then line is selected.
By this you can get the selected lines.
‎2009 May 29 10:11 AM
‎2009 May 29 11:16 AM
‎2009 May 29 11:17 AM
Hi Guys,
The table control was not used in the exist program.They were used field catalog and ALV function module.In that case,how to handle the selected items and how to do the same in ALV.Pls help me out on this.
‎2009 May 29 11:40 AM
hi
when ever u access a pushbutton in PAI
each and very push button has a function code attached to ii
and it will be stored in sy-ucomm system variable.
in Abap programs since we should not change system varible
declare a variable called OK-CODE and pass the value of sy-ucomm to it.
Regards