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

selectoption reg

Former Member
0 Likes
751

hi,

i move the data from flatfile to internal table and the values are loaded in f4 help using select option. if i trying these i got event error.give some example.

regards

muthuraman.d

1 ACCEPTED SOLUTION
Read only

bpawanchand
Active Contributor
0 Likes
732

Issue is not clear but you can go though the

[Sample Code|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2d26e490-0201-0010-d9ab-f81cfb464ae6]

6 REPLIES 6
Read only

bpawanchand
Active Contributor
0 Likes
733

Issue is not clear but you can go though the

[Sample Code|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2d26e490-0201-0010-d9ab-f81cfb464ae6]

Read only

0 Likes
732

hi ,

i need to load my select option with internal table values

Read only

0 Likes
732

Check this [link|https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/f4%252bhelp%252bof%252bone%252bfield%252bdepends%252bon%252bother%252bfield]

Read only

Former Member
0 Likes
732

Hi,

Question is not clear. Could you plz elaborate breifly.

Regards,

Pavan

Read only

0 Likes
732

tables: zbdc.

DATA: BEGIN OF wa_tab,

materialno TYPE zbdc-materialno,

customerno TYPE zbdc-customerno,

custmaterialno TYPE zbdc-custmaterialno,

salesorg TYPE zbdc-salesorg,

processingdate TYPE zbdc-processingdate,

tranamount TYPE zbdc-tranamount,

END OF wa_tab.

DATA:BEGIN OF WA_SER,

MATERIALNO TYPE ZBDC-MATERIALNO,

END OF WA_SER.

DATA: IT_SER LIKE TABLE OF WA_SER WITH HEADER LINE.

DATA: it_tab LIKE TABLE OF wa_tab WITH HEADER LINE.

SELECTION-SCREEN begin of screen 5000.

select-OPTIONS matnum for it_tab-materialno.

skip 2.

select-options cusnum for it_tab-customerno.

skip 2.

PARAMETER : p1 type i.

SELECTION-SCREEN end OF SCREEN 5000.

INITIALIZATION.

AT SELECTION-SCREEN.

loop at it_tab .

MOVE-CORRESPONDING it_Tab to it_ser .

append it_ser.

endloop.

AT SELECTION-SCREEN on VALUE-REQUEST for MATNUM-low .

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'MATERIALNO'

  • PVALKEY = ' '

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

DYNPROFIELD = 'MATNUM-LOW'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = it_ser

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

  • 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.

START-OF-SELECTION.

call screen 5000.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename ='C:\my folder\BDCSP.TXT'

FILETYPE = 'DAT'

HAS_FIELD_SEPARATOR = '#'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

data_tab = it_tab

  • EXCEPTIONS

  • FILE_OPEN_ERROR = 1

  • FILE_READ_ERROR = 2

  • NO_BATCH = 3

  • GUI_REFUSE_FILETRANSFER = 4

  • INVALID_TYPE = 5

  • NO_AUTHORITY = 6

  • UNKNOWN_ERROR = 7

  • BAD_DATA_FORMAT = 8

  • HEADER_NOT_ALLOWED = 9

  • SEPARATOR_NOT_ALLOWED = 10

  • HEADER_TOO_LONG = 11

  • UNKNOWN_DP_ERROR = 12

  • ACCESS_DENIED = 13

  • DP_OUT_OF_MEMORY = 14

  • DISK_FULL = 15

  • DP_TIMEOUT = 16

  • OTHERS = 17

.

*IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

*ENDIF.

Read only

Former Member
0 Likes
732

Hi,

PARAMETERS : s_epstp FOR t163x-epstp.

&----


*& Form F4_HELP_EPSTP

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM F4_HELP_EPSTP .

SELECT epstp

ptext FROM t163x

INTO TABLE it_t163x

WHERE spras = sy-langu.

v_retfield = 'EPSTP'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = v_retfield

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'S_EPSTP-LOW'

window_title = 'PO Item Category'

value_org = 'S'

callback_program = sy-repid

TABLES

VALUE_TAB = it_t163x[]

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

IF SY-SUBRC EQ 0.

  • p_epstp = it_return_tab.

ENDIF.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = v_retfield

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'S_EPSTP-HIGH

window_title = 'PO Item Category'

value_org = 'S'

callback_program = sy-repid

TABLES

VALUE_TAB = it_t163x[]

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3

.

IF SY-SUBRC EQ 0.

  • p_epstp = it_return_tab.

ENDIF.

ENDFORM. " F4_HELP_EPSTP