Application Development 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: 

abap programming

Former Member
0 Kudos

Hi Friends,

I have two parameters on selection screen.

Will anybody tell me how to do this???

for exm i have EBELN & EBELP as parameter in my selection screen.

Now depending on value of EBELN value of EBELP should be display by pressing F4 on selection screen.

11 REPLIES 11

Former Member
0 Kudos

PARAMETERS: po_num like ekpo-ebeln,

po_itm like ekpo-ebelp.

Declare your parameters as above and I think it should do it.

ELSE.

u need to add AT SELECTION-SCREEN ON VALUE REQUEST for po_itm.

select ebelp from ekpo into it_ebelp where ebeln = po_num.

Use F4IF_INT_TABLE_VALUE_REQUEST to display the values

-Kiran

Message was edited by: Kiran Raorane

laxmanakumar_appana
Active Contributor
0 Kudos

Hi,

Check this :

without declaring parameters declare as select-options like below and do the F4 code :

SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME.

SELECT-OPTIONS : P_EBELN FOR EKPO-EBELN NO-EXTENSION NO INTERVALS.

SELECT-OPTIONS : P_EBELP FOR EKPO-EBELP NO-EXTENSION NO INTERVALS.

SELECTION-SCREEN : END OF BLOCK b2.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_EBELP-low.

*********

select the values into i_output depending on the EBELN values

select EBELP into table i_output

from EKPO where

EBELN eq p_EBELN.

**********

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'EBELP'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = P_EBELP

value_org = 'S'

TABLES

value_tab = i_output

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards

Laxman

0 Kudos

CAN WE DO IT WITH EXTENSION AND INTERVALS FOR SELECT OPTIONS.

0 Kudos

Yes you can do that..

SELECT-OPTIONS : S_EBELN FOR EKPO-BELN , 
                S_EBELP FOR EKPO-EBELP .

Regards

vijay

former_member188685
Active Contributor
0 Kudos

Hi,

Do this way...


SELECT-OPTIONS : S_EBELN FOR EKPO-EBELN NO-EXTENSION NO INTERVALS,
                 S_EBELP FOR EKPO-EBELP NO-EXTENSION NO INTERVALS.

Regards

vijay

Former Member
0 Kudos

Hi,

First give value for EBELN.

in the At selection-screen on help-request of EBELP

select the EBELP where EBELN in S_EBELP

Then Use F4IF_INT_TABLE_VALUE_REQUEST to display the corresponding values.

Former Member
0 Kudos

Hi,

u just copy and paste this code in ur program. u can get it.

REPORT Z2324_TRAINING2 .

DATA: WF_DYN TYPE SY-REPID,

WF_DYNNUM TYPE SY-DYNNR.

DATA: BEGIN OF INT_HELP OCCURS 0,

EBELP LIKE EKPO-EBELP,

END OF INT_HELP.

PARAMETERS: P_EBELN LIKE EKKO-EBELN,

P_EBELP LIKE EKPO-EBELP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_EBELP.

WF_DYN = SY-REPID.

WF_DYNNUM = SY-DYNNR.

SELECT EBELP FROM EKPO INTO TABLE INT_HELP.

IF SY-SUBRC = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'EBELP'

DYNPPROG = WF_DYN

DYNPNR = WF_DYNNUM

DYNPROFIELD = 'P_EBELP'

WINDOW_TITLE = 'F4 help'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = INT_HELP.

ENDIF.

Thanks and regards,

- Selvapandian Arunachalam

Former Member
0 Kudos

Hi Amit,

It is simple...Just go through this link...

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm

This is for screen. YOu can modify it to be applied in selection screen.

<b>Close the thread once the problem is resolved.</b>

Regards,

SP.

Former Member
0 Kudos

Hai Amit

Check the following Code

TABLES : EKPO.

DATA: BEGIN OF IT_EKPO OCCURS 0,

EBELN LIKE EKPO-EBELN,

EBELP LIKE EKPO-EBELP,

END OF IT_EKPO.

DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.

PARAMETERS : P_EBELN LIKE EKPO-EBELN.

PARAMETERS : P_EBELP LIKE EKPO-EBELP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_EBELN.

SELECT EBELN EBELP FROM EKPO INTO table IT_EKPO.

if sy-subrc = 0.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'EBELN'

DYNPPROG = SY-REPID

DYNPNR = '1000'

DYNPROFIELD = 'P_EBELN'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = IT_EKPO

RETURN_TAB = T_RETURN

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

if sy-subrc = 0.

read table it_ekpo index 1 transporting ebeln.

move it_ekpo-ebelp to p_ebelp.

endif.

Thanks & regards

Sreenivasulu P

Former Member
0 Kudos

HI,

Check TXN - F110...

U will get a code (something like below) if u go in status and double-click on screen 200-

CHAIN.

FIELD F110V-LAUFD.

FIELD F110V-LAUFI.

MODULE INPUT_0200.

ENDCHAIN.

Its the same functionality as u need...

Hope this helps u.

Regards.

Seema.

Former Member
0 Kudos

hi

just check the tran, F110 ....

i hope it will help u

chetan vishnoi