04-21-2008 11:44 AM
Hi gurus,
I done one report to get the Purchase order details. At the time of creating purchase order the users enters a One text field in the Purchase order header text of ME21N transaction. I need to fetch that field into Report. Upto this its fine. I also done this report by using the function module "READ_TEXT". The o/p is also generated successfully.
But now our client is asking, Please put that text field in selection-screen. Once he presses F4 in that field he needs to display all the values in text field. I know how to do if it is a table field. But it is a purchase order header text. Client enters different text when he creates diferent purchase orders.
Based on that text field only the report o/p will needs to display.
For example:
The User1 creats a Purchase order using ME21N. In that he enters Purchase order header text as ABC.
when ever he creats a purchase order he enters only ABC.In this way he creats 100 Purchase orders.
if the user execute the report and in selection screen of that text field , suppose he gives a ABC, only those 100 purchase orders only needs to appear.
Like this so many users enters no.of text items. Suppose there are 100 users. totally 100 text values will be there.
once he presses F4 help on the selecton screen all 100 values need to display. And this is dynamic, the no may increase in future also. thats totally depends on Purcase orders.
Please guide me how to do this.
Thanks in Advance...
Thanks and Regards
Siri........
04-21-2008 11:52 AM
hi frnd,
try like this
write the logic to fetch text fields into some internal table in
at selection-screen output event.
and pass this to selection-option as f4 using ...> call function 'F4IF_INT_TABLE_VALUE_REQUEST'.
ex
at selection-screen output.
use fm "READ_TEXT". and assign all values to one internal table
then
call function 'F4IF_INT_TABLE_VALUE_REQUEST'.
hope it may help u.
regards,
chandu
04-21-2008 11:58 AM
Hi chandu,
Thanks for u r valuble reply, i will try like that.. Please can you tell me brielfly what is the exact use of AT SELECTION-SCREEN OUTPUT. at what scenarios it is helped..
Thanks and Regards
Siri....
04-21-2008 12:01 PM
Hi,
AT SELECTION-SCREEN OUTPUT affect the selection screen display and overwrite the user inputs from previous displays of the same selection screen.
This is used for any dynamic processing of selection screen.
Regards,
Madhumitha
04-21-2008 12:04 PM
hi ,
this event triggers at PBO ,
and also to make any modifications to the screen we use this event.
In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
for u'r criteria u can uswe like this it's good option
at selection-screen on value-request for <field>.
regards,
chandu.
04-21-2008 11:53 AM
hi frnd,
try like this
write the logic to fetch text fields into some internal table in
at selection-screen output event.
and pass this to selection-option as f4 using ...> call function 'F4IF_INT_TABLE_VALUE_REQUEST'.
ex
at selection-screen output.
use fm "READ_TEXT". and assign all values to one internal table
then
call function 'F4IF_INT_TABLE_VALUE_REQUEST'.
hope it may help u.
regards,
chandu
04-21-2008 12:05 PM
All the Po text are stored in STXH table..so try to get the text from that table....within the select statement...in your where condition put a condition like:
where ebeln = ekko-ebeln and <text> = stxh-<text>.