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: 

ABAP User Interface problem

Former Member
0 Kudos

Hi All,

My Screen consist of 3 Input/Output Field and a Radio button group which consist of 8 radio button.

Problem 1:

When select a radio button, 2 of the Input/Output Field data that was define previously was clear and 1 of the Input/Output Field data still remain.

Problem 2:

Data was enter in the 3 Input/Output Field. When i submit, the program will validate the 1st Input/Output Field. When it validate, the 2 of the Input/Output Field data was clear off.

How to prevent the data being clear off?

Code Sample:

==============================================================

Flow Logic

==============================================================

PROCESS BEFORE OUTPUT.

MODULE STATUS_9000.

PROCESS AFTER INPUT.

CHAIN.

FIELD:

TB_OBJECTID,

TB_LOADID,

TB_LOADDESC.

MODULE USER_COMMAND_9000.

ENDCHAIN.

==============================================================

==============================================================

ABAP Program

==============================================================

REPORT ZTEST_RADIOBTN.

DATA: TB_OBJECTID(20) TYPE c,

TB_OBJECTDESC(100) TYPE c,

RB_STEP1(1) TYPE c,

RB_STEP2(1) TYPE c,

RB_STEP3(1) TYPE c,

RB_STEP4(1) TYPE c,

RB_STEP5(1) TYPE c,

RB_STEP6(1) TYPE c,

RB_STEP7(1) TYPE c,

RB_STEP8(1) TYPE c.

START-OF-SELECTION.

CALL SCREEN 9000.

" Main Screen - PBO.

MODULE STATUS_9000 OUTPUT.

SET PF-STATUS 'MAIN_SCREEN'.

  • SET TITLEBAR 'MAIN_SCREEN'.

ENDMODULE.

" Main Screen - PAI.

MODULE USER_COMMAND_9000 INPUT.

CASE sy-ucomm.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'BACK'.

Leave to SCREEN '0'.

WHEN 'EXECUTE'.

  • CASE TB_OBJECTID.

  • WHEN '1'.

  • TB_OBJECTDESC = '1'.

  • WHEN '2'.

  • TB_OBJECTDESC = '2'.

  • WHEN OTHERS.

  • TB_OBJECTDESC = 'Invalid Input'.

  • ENDCASE.

PERFORM validate_ObjectID.

ENDCASE.

ENDMODULE.

FORM validate_ObjectID.

IF TB_OBJECTID IS INITIAL.

SET CURSOR FIELD 'TB_OBJECTID'.

MESSAGE e000(ZSCSDM_MSG) WITH 'Please define Object ID'.

ENDIF.

ENDFORM.

Best Regards,

Rayden

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rayden

The problem might be because there is no program work areas for the fields TB_LOADID,

TB_LOADDESC.

So both of your problems may be solved if you declare the above mentioned variables in your program i.e. in the Report ZTEST_RADIOBTN. <b>Just a declaration of those variable should solve your problem.</b>

Reward points for all useful answers.

~Ranganath

3 REPLIES 3

Former Member
0 Kudos

Hi Rayden

The problem might be because there is no program work areas for the fields TB_LOADID,

TB_LOADDESC.

So both of your problems may be solved if you declare the above mentioned variables in your program i.e. in the Report ZTEST_RADIOBTN. <b>Just a declaration of those variable should solve your problem.</b>

Reward points for all useful answers.

~Ranganath

0 Kudos

Hi Ranganath,

Thanks. My careless mistake. Well that was an easy point for you. haha

Regards,

Rayden

krishnannarayanan_nampoot
Active Participant
0 Kudos

Hi Ray,

The issue seems to be that there is no varaible decalred in your top include to hold the values of the screen variables.

Concept is that on any user actio like an 'Enter' etc causes the flow logic ( PBO & PAI ) to be executed. So during these first the system transfers the screen field values to the available variables ( Only if it finds any .. so declare variables in Top Include with same name.)

Later during PBO execution it transfers the values back from variables in Top include ( Local variables ) to the screen field.

<b>On User Action :

PAI Executed => Screen Values --> Local Var.

then

PBO Executed => Local Var --> Screen Values.

This is the flow concept.</b>

<i><b>Reward Points if useful .</b></i>