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: 

Selection screen value and Passing null in ABAP

0 Kudos
290

Selection Screen :

Code:

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS : S_PLANT FOR VBAP-WERKS NO INTERVALS.
SELECTION-SCREEN END OF BLOCK B2.

What I want :

When User will submit the form then Factory/Plant

then if value is null then it will show ALL in header

LOOP AT S_PLANT.
IF IT_SECONDARY IS INITIAL.
S_PLANT-LOW = 'ALL'.
MODIFY S_PLANT.
ELSE.

CASE S_PLANT-LOW.
WHEN '2100'.
S_PLANT-LOW = 'SDL'.
MODIFY S_PLANT.
WHEN '1100'.
S_PLANT-LOW = 'SIL'.
MODIFY S_PLANT.
ENDCASE.
ENDIF.
ENDLOOP.

wa_top-typ = 'A'.
wa_top-info = ''.
concatenate 'Plant : ' S_PLANT-LOW
into wa_top-info SEPARATED BY SPACE.
APPEND wa_top TO it_top.
CLEAR wa_top.


But it's not working. Please Help

2 REPLIES 2

venkateswaran_k
Active Contributor
0 Kudos
125

Hi

Hope you have written the header portion in the "top of page" event in the report.

Can you show us the code

Sandra_Rossi
Active Contributor
0 Kudos
125

Debug your code and tell us the calculated value of S_PLANT-LOW, if it's null or ALL. If it's still null, I guess you can continue the debug and find the bug...