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

code correction for select option .

Former Member
0 Likes
1,054

Its a driver programme for  a smart form . I cant select any any option form the selection box  infact the small square box which generally apear after the selection box dosent appear  in this case .  Any suggestions  ?

REPORT  ZSAT_FORMS1.

TABLES: MKPF.

DATA: FM_NAME TYPE RS38L_FNAM.

*

*TYPES : BEGIN OF I_tab,

* MBLNR  type  mkpf-MBLNR ,

*  MJAHR type  mkpf-MJAHR ,

*  AEDAT type mkpf-AEDAT ,

*  END OF I_tab .

*

* data : INT_MKPF TYPE TABLE OF I_TAB .

DATA: BEGIN OF INT_MKPF OCCURS 0.

INCLUDE STRUCTURE MKPF.

DATA: END OF INT_MKPF.

SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR . "MEMORY ID 001.

*SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.

*MOVE-CORRESPONDING MKPF TO INT_MKPF.

*APPEND INT_MKPF.

*

*ENDSELECT.

select * from mkpf   into CORRESPONDING FIELDS OF TABLE INT_MKPF UP TO  10 ROWS where mblnr in s_mblnr .

*At the end of your program.

*Passing data to SMARTFORMS

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZSAT_FORMS1'(001)

VARIANT = ' '

DIRECT_CALL = ' '

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

if sy-subrc <> 0.

WRITE: / 'ERROR 1'.

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

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

endif.

call function FM_NAME

*EXPORTING

*ARCHIVE_INDEX =

*ARCHIVE_INDEX_TAB =

*ARCHIVE_PARAMETERS =

*CONTROL_PARAMETERS =

*MAIL_APPL_OBJ =

*MAIL_RECIPIENT =

*MAIL_SENDER =

*OUTPUT_OPTIONS =

*USER_SETTINGS = 'X'

*IMPORTING

*DOCUMENT_OUTPUT_INFO =

*JOB_OUTPUT_INFO =

*JOB_OUTPUT_OPTIONS =

TABLES

INT_MKPF = INT_MKPF

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

if sy-subrc <> 0.

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

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

endif .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,011

Hi Satyanaryan,

MKPF-MBLNR doesn't have his own search help. That is the reason you don't have the F4 option available.

If you want that you have write a logic to have all the material documents and then use the F4 function module - 'F4IF_INT_TABLE_VALUE_REQUEST' to and pass the internal table having the material documents.

Regards,

Abhi

5 REPLIES 5
Read only

former_member191569
Active Participant
0 Likes
1,011

Which box do you mean?

I have created a sample report with that select option and I get this result:

How is your screen?

Read only

0 Likes
1,011

I mean the small square box just next to selection field " search box "

Read only

Former Member
0 Likes
1,012

Hi Satyanaryan,

MKPF-MBLNR doesn't have his own search help. That is the reason you don't have the F4 option available.

If you want that you have write a logic to have all the material documents and then use the F4 function module - 'F4IF_INT_TABLE_VALUE_REQUEST' to and pass the internal table having the material documents.

Regards,

Abhi

Read only

satyabrata_sahoo3
Contributor
0 Likes
1,011

Its because MKPF-MBLNR does not have a Searh Help.

You can create your own search help and add it in program in AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field> event.

You can get ample of sample codes in SCN on this.

-SS

Read only

Former Member
0 Likes
1,011

Thank you all for your answers , my  doubt is clear now