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

Select-Options Help

Former Member
0 Likes
452

Hi.

I have this small program with a select-options s_tran.

I need to call function Z_UNLOCK for each entry in s_tran.

How can I make that?

Thanks

Best regards

PARAMETERS: p_warn TYPE ltap-LGNUM.

SELECT-OPTIONS: s_tran FOR LTAK-tanum.

loop at ......................?????

CALL FUNCTION 'Z_UNLOCK'

EXPORTING

iv_warehouse = p_warn

iv_tanum = s_tran-tanum

language = sy-langu

IMPORTING

return = return.

IF return-type = ''.

EXIT.

ENDIF.

Endloop.

1 ACCEPTED SOLUTION
Read only

mnicolai_77
Active Participant
0 Likes
335

hi,

try to use this code:

>PARAMETERS: p_warn TYPE ltap-LGNUM.

>SELECT-OPTIONS: s_tran FOR LTAK-tanum.

>data: lt_ltak type ltak occurs 0 with header line.

>start-of-selection.

>select * from ltak into table lt_ltak where tanum in s_tran.

>

>

>loop at lt_ltak.

>

>CALL FUNCTION 'Z_UNLOCK'

>EXPORTING

>iv_warehouse = p_warn

>iv_tanum = lt_ltak-tanum

>language = sy-langu

>IMPORTING

>return = return.

>

>IF return-type = ''.

>EXIT.

>ENDIF.

>

>Endloop.

bye

Marco

1 REPLY 1
Read only

mnicolai_77
Active Participant
0 Likes
336

hi,

try to use this code:

>PARAMETERS: p_warn TYPE ltap-LGNUM.

>SELECT-OPTIONS: s_tran FOR LTAK-tanum.

>data: lt_ltak type ltak occurs 0 with header line.

>start-of-selection.

>select * from ltak into table lt_ltak where tanum in s_tran.

>

>

>loop at lt_ltak.

>

>CALL FUNCTION 'Z_UNLOCK'

>EXPORTING

>iv_warehouse = p_warn

>iv_tanum = lt_ltak-tanum

>language = sy-langu

>IMPORTING

>return = return.

>

>IF return-type = ''.

>EXIT.

>ENDIF.

>

>Endloop.

bye

Marco