0

I want to display data, which is entered into text-box, in a new screen on submit ( Pushbutton) click event in ABAP Report program.

TABLES: SSCRFIELDS.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN:BEGIN OF LINE,
COMMENT 10(15) TEXT-S01.
PARAMETERS: P_NAME TYPE C LENGTH 17.


SELECTION-SCREEN:END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 33(10) submit USER-COMMAND CLI1.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b1.

INITIALIZATION.
 submit = 'CLI1'.

AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'CLI1'.
CALL FUNCTION 'ZFM_OPEN_SCREEN'
ENDCASE.

In Function module 'ZFM_OPEN_SCREEN', I'm creating a new Selection-Screen. But problem is click event is not working, it just refresh the current screen.

FUNCTION ZFM_OPEN_SCREEN.
WRITE: P_NAME.
ENDFUNCTION.

Its not giving an error,but doesn't execute.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
divScorp
  • 498
  • 1
  • 8
  • 17
  • wait I'll share code. – divScorp Oct 23 '17 at 06:34
  • @vwegert please check the code. – divScorp Oct 23 '17 at 06:44
  • That code snippet is incomplete and syntactically incorrect, but after correcting the obvious mistakes, it works here. Please post a complete example that you have actually tested to verify it demonstrates the problem. – vwegert Oct 23 '17 at 06:58
  • Why do you assume that the `WRITE` statement creates a new selection screen (hint: it does not)? – vwegert Oct 23 '17 at 08:29
  • @vwegert But Form and Function Module doesn't accept selection-screen. It'll through error. – divScorp Oct 23 '17 at 08:32
  • 1
    Yes, and rightly so. You clearly need to gather a lot of background knowledge about ABAP programming and (legacy) ABAP program and screen organization, for which stackoverflow is not really a good medium. You are most certainly trying to achieve something, but haven't told us what, and you're trying to use selection screens, which are probably the wrong tool for the job, but we don't know that either. – vwegert Oct 23 '17 at 08:37

0 Answers0