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

Problem In SELECT-OPTIONS.

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
1,056

Hi All,

I have a requirement in which when user enters the range of values for PO in select-options, if a particular PO is not released then the error message should come on the status bar giving paryicular PO number is not released.

I can do for a particular PO number, but not for the range of values.

If user enters the range of values , how should i handle it??

Can anybody send a piece of code for it or any F.M. for this one.

Regards,

Simha.

8 REPLIES 8
Read only

Former Member
0 Likes
914

Hi,

Select all Po numbers and Release status indicator in the given range of select options and store it in a internal table.

loop at the internal table and check if release has not happpened. give error message for which release has not yet happened.

Read only

0 Likes
914

1) on click it show alv popup in which ponumber which is not release are dispaly.

2) when u select release po number it will automaticaly delete from ur give number range and ur programm run smoothaly....

for this just cullect all the po number in a internal table. and pass it to alv popup display.

and on clicking(user command) delete po number from internal table and rest po number which are not release po display in ur report...

Read only

vinod_gunaware2
Active Contributor
0 Likes
914

Hi

Use

<b>SELECT_OPTIONS_RESTRICT</b> Make use of SELECT-OPTIONS easier on the selection screen

or

u can use select query with between clause and then validate the data in at selection-screen output.

regards

vinod

Read only

Former Member
0 Likes
914

Hi Narsimha,

You can do the same on the<b> At Selection-screen .</b>

In that Select all Po numbers and Release status indicator in the given range of select options and store it in a internal table.

loop at the internal table and check if the status is release .

Give the information message followed by STOP.

Hope this will help you.

Cheers

Sunny

Rewrd points, if found helpful

Read only

Former Member
0 Likes
914

HI bandla

you cant show the status for all the Purchase order in the status bar, instead you display the list as a report.

for that store the data in the internal table then loop through the table using where condition and print the data.

regards

kishore

Read only

0 Likes
914

Hi ,

You can do the same with the At Selection-screen .

In that Select all Po numbers and Release status indicator in the given range of select options and store it in a internal table.

loop at the internal table and check if the status is release . Give the information message followed by STOP.

hope it would solve the purpose....

Read only

Former Member
0 Likes
914

Hi,

Firstly, You can not show the status of PO in status bar for multiple POs. Instead, generate a list of released POs.

Try following logic.

Start-of-selection.

loop at so_ebeln.

clear i_ekko.

call BAPI_PO_GETDETAIL

Exporting

PURCHASEORDER = so_ebeln

Importing

PO_HEADER = i_ekko.

If sy-subrc ne 0.

endif.

if i_ekko-REL_IND = 'X'.

write 😕 i_ekko-ebeln.

endif.

endloop.

Hope it helps.

Regards,

Shashank

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
914

Hi,

Try the following and kindly reward points by clicking the star on the left of reply,if it helps.

tables mara.

data : begin of itab occurs 0,

record(1000),

end of itab.

select-options s_matnr for mara-matnr.

at selection-screen output.

loop at s_matnr.

if s_matnr-low ne '100'.

concatenate itab-record s_matnr-low into itab-record separated by space.

endif.

endloop.

append itab.

if not itab[] is initial.

loop at itab.

message i000 with itab-record .

endloop.

endif.