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: 

how to call selection screen before smartforms?

former_member1330258
Participant
0 Kudos

Hi experts,

I wanna call a selection screen before displaying smartforms. In NACE transaction, I have program that calls the smartforms and In that program, I wanna add a selection screen with three fields whom values comes from a value range that prepared by me. I don't wanna use popup selection FM's because as ,I said, I wanna display the values according to a value range.

Do you know any way to do this?

11 REPLIES 11

Former Member
0 Kudos

hmmm you could make use of the "CALL SELECTION-SCREEN" statement.

Rocky1
Active Participant
0 Kudos

Hi,

What is the problem? Just in the program that calls smartform, code for displaying selection screen before it calls smartforms. If I am not gettign your exact requirement, then do clarify it.

Thanks & Regards

Rocky

Former Member
0 Kudos

Hi,

You just need write your select option as like normal code. But keep it in mind all selection screen data would be before INITIALIZATION event.

Is it clear to you?

Regards,

Lokesh.

former_member1330258
Participant
0 Kudos

Hi Floran, I have already tried call selection-screen statement but It didn't work. It gave me a dump that says ;

The system attempted to use dynpro 0900 in program "SAPLVMSG". This dynpro does not exist.

Hi Rocky ,

I have already tried calling selection-screen before displaying smartforms but I couldn't do it.

In NACE transaction, there is a program and its name ZSD_RV56TD00. In that program my smartforms Is being triggered. However, when I write the code call selection-screen it displays dump screen.

The system attempted to use dynpro 0900 in program "SAPLVMSG". This dynpro does not exist.

as far as I understood, when I call a screen the SAP goes to SAPLVMSG include and it search my screen in it. Because my screen is in program ZSD_RV56TD00, SAP doesn't find my screen in SAPLVMSG.

that is my problem.

0 Kudos

Hi Taner,

"You could have tried this one
In program ZSD_RV56TD00 " add the below code

SELECTION-SCREEN : BEGIN OF SCREEN 900.
PARAMETERS : matnr TYPE matnr.
SELECTION-SCREEN : END OF SCREEN 900.

"Hello 

" Do not call  your Screen in FORM ENTRY but instead call it in this Program only.
Your Perform donot identify this Screen in Program ZSD_RV56TD00 

call SELECTION-SCREEN 900.

Cheerz

Ram

0 Kudos

well you cant call a screen that doesnt exist, so first you need to create your selection screen.

If you have a desired number in mind you might want to make use of the SELECTION-SCREEN BEGIN OF SCREEN statement.

Former Member
0 Kudos

Hi,

You can use selet options in your driving program which triggers the Smartform.You can easily take inputs in this selection screen and pass the required data to the smartform .

Regards,

Samreen.

former_member1330258
Participant
0 Kudos


REPORT zsd_rv56td00.

SET EXTENDED CHECK OFF.
TABLES: vbpla, thead, ttxern, ttxit, t005, vbddl, stxh, sadr. "SADR40A
INCLUDE vttkdata.                      "Shipment Header
INCLUDE vttsdata.                      "Shipment Segment
INCLUDE vttpdata.                      "Shipment Items
INCLUDE vbpadata.                      "Partner
INCLUDE vtfadata.                      "Flow
INCLUDE sadrdata.                      "Address
INCLUDE vtlfdata.                      "Delivery Selection
INCLUDE rvadtabl.                      "Messages
INCLUDE vsedata.                       "shipping units
INCLUDE rv56acom.                      "I/O-Structure
*INCLUDE zsd_form_screens.
SET EXTENDED CHECK ON.

DATA:
  xscreen(1)              TYPE c,
  retcode                 LIKE sy-subrc VALUE 0,
  there_was_output(1)     TYPE c        VALUE space,
  new_page_was_ordered(1) TYPE c        VALUE space.

CONSTANTS:
  no(1)  VALUE space,
  yes(1) VALUE 'X'.

TABLES : tpar,vbak.                                         "n_742056.

SELECTION-SCREEN BEGIN OF SCREEN 900.
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS :
 s_ulke FOR vbak-zzcikisulke,
 s_gumruk FOR vbak-zzvarisgumruk,
 s_ant FOR vbak-zzantrepo.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 900. 

Florian as you can see I created the screen! It exists!

former_member1330258
Participant
0 Kudos

After that I call selection screen in a subroutine.

Edited by: Taner Güngör on Apr 8, 2010 2:13 PM

0 Kudos

Maybe you have the same problem as I had (that's a strange behavior from SAP):

If you define a routine in the program ZCALLEE where the selection-screen is defined, and called by a routine:


REPORT zcallee.
SELECTION-SCREEN BEGIN OF SCREEN 1010.
  PARAMETERS test TYPE c LENGTH 50.
SELECTION-SCREEN END OF SCREEN 1010.
FORM display_screen.
  CALL SELECTION-SCREE 1010.
ENDFORM.

If then you call the routine from another program ZCALLER


REPORT zcaller.
PERFORM display_screen IN PROGRAM zcallee.

a dump DYNPRO_NOT_FOUND occurs in program ZCALLER, with analysis message "The system attempted to use dynpro 1010 in program ZCALLER" (which is very weird as 1010 is defined and called in ZCALLEE)

The only workaround I found to continue using PERFORM (useful for getting back parameters, and better for performance than using SUBMIT statement) is to convert ZCALLEE program into function group (create it and transfer the whole code and objects), then you may use PERFORM display_screen IN PROGRAM saplzcallee (notice prefix SAPL used to reference the function group program name), it won't dump

Edited by: Sandra Rossi on Apr 9, 2010 6:10 PM : post REWRITTEN

former_member1330258
Participant
0 Kudos

Hi to all,

we fix the problem by doing defining a selection-screen in a seperate program. After that we call that screen using ;


      SUBMIT zsd_form_screens
       VIA SELECTION-SCREEN AND RETURN.

thank you all for trying to help me.