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

How to create display screen?

Former Member
0 Likes
9,397

dear gurus,

igot stuck in second screen ie display screen means when i clicked next button then 2nd screen is open and that

application number is editable.whenever i have enter application num and i clicked submit thn this record will be display but there is no display in screen ?

what should i do?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
9,354

Hi try this code,

IF sy-ucomm = 'SUB'.
   CLEAR w_tab.
  SELECT SINGLE * FROM zztable2 INTO w_tab WHERE appno = APP1.

   name1 = w_tab-name.
   mobile1 = w_tab-mobileno.
   dat1 = w_tab-dat.
   IF w_tab-gender = 'MALE'.
     male1 = 'X'.
   else.
     male1 = ' '.
   ENDIF.
    IF w_tab-gender = 'FEMALE'.
     female1 = 'X'.
   else.
     female1 = ' '.
   ENDIF.

clear : ssc1,hsc1,degree1.
if w_tab-ssc = 'SSC' and w_tab-hsc = 'HSC'.
   ssc1 = 'X'.
   hsc1 = 'X'.
   ELSEIF w_tab-hsc = 'HSC' and w_tab-degree = 'DEGREE'.
    hsc1 = 'X'.
    degree1 = 'X'.
  ELSEIF w_tab-degree = 'DEGREE' and w_tab-ssc = 'SSC'.
    ssc1 = 'X'.
    degree1 = 'X'.
endif.
ENDIF.

dear gurus,

igot stuck in second screen ie display screen means when i clicked next button then 2nd screen is open and that

application number is editable.whenever i have enter application num and i clicked submit thn this record will be display but there is no display in screen ?

what should i do?

27 REPLIES 27
Read only

FredericGirod
Active Contributor
0 Likes
9,354

Hi,

I'm not sure to understand, could you put a screenshot of the second screen ?

Did you manage your PAI with CHAIN .. FIELDS ..   ?

regards

Fred

Read only

former_member212705
Active Participant
0 Likes
9,354

Hi PR,

when you click submit, write fetching logic in PAI of this screen, and write the display logic in the PBO of called screen. I hope this will solve your issue.

Regards,

AKT

Read only

0 Likes
9,354

hi ashish,

can u pls tel me logic of display screen.

and fetching logic

because this is new concept for me?

plss help me

Thanks & Regards

Prathmesh Rane.

Read only

0 Likes
9,354

Hi PR,

in the PAI of calling screen, when you press submit suppose function code of submit is 'SUBMIT'.

in the PAI of calling screen,,,,

case ok_code .

when 'SUBMIT'.

perform fetch_data.  --- fetch data on the basis of you req. collect data in some global fields.

call screen '9001'. = your called screen

....

...

in screen 9001.

in the PBO...

Module display_data.

inside module display_data--- write perform display.

pass the variables into screen fields.

I hope now you will be able to solve the issue.

Read only

0 Likes
9,354

you can fetch the data into variables as well as in some global work area.

Read only

Former Member
0 Likes
9,355

Hi try this code,

IF sy-ucomm = 'SUB'.
   CLEAR w_tab.
  SELECT SINGLE * FROM zztable2 INTO w_tab WHERE appno = APP1.

   name1 = w_tab-name.
   mobile1 = w_tab-mobileno.
   dat1 = w_tab-dat.
   IF w_tab-gender = 'MALE'.
     male1 = 'X'.
   else.
     male1 = ' '.
   ENDIF.
    IF w_tab-gender = 'FEMALE'.
     female1 = 'X'.
   else.
     female1 = ' '.
   ENDIF.

clear : ssc1,hsc1,degree1.
if w_tab-ssc = 'SSC' and w_tab-hsc = 'HSC'.
   ssc1 = 'X'.
   hsc1 = 'X'.
   ELSEIF w_tab-hsc = 'HSC' and w_tab-degree = 'DEGREE'.
    hsc1 = 'X'.
    degree1 = 'X'.
  ELSEIF w_tab-degree = 'DEGREE' and w_tab-ssc = 'SSC'.
    ssc1 = 'X'.
    degree1 = 'X'.
endif.
ENDIF.

Read only

0 Likes
9,354

hi,

in first screen when i click save button then all record should be save in ztable and that particular time status messege should be display on the screen?

so,what what should i do to get the status meesege?

Read only

0 Likes
9,354

Hi rane,

Try this syntax after modify statment.

MODIFY zztable2 FROM table i_tab.

MESSAGE 'DATA successfully saved in Ztable' TYPE 'I'.

Read only

0 Likes
9,354

hi ,

now its working status message.

now my requriment is when i click save button then all record shold be clear

what should i do?

Read only

0 Likes
9,354

HI Rane,

In which place record will be cleared?

in first screen? or second screen ?

Read only

0 Likes
9,354

HI LAKSMI,

IN First screen when i click save button message shown data successfuly in ztable that time data should be clear

Read only

0 Likes
9,354

Hi Rane,

After getting the message clear all screen variables.

MODIFY zztable2 FROM table i_tab.

MESSAGE 'DATA not saved in Ztable' TYPE 'I'.

clear : appno,

         name,

         mobileno,

         dat,

         male,

         female,

         SSC,

         HSC,

         DEGREE.

Read only

0 Likes
9,354

Hi rane,

Clear statement will be worked or not.

Read only

0 Likes
9,354

Hi Prathmesh,

You can clear all the screen variables or you can call the first screen again after your modify & message statements.

Read only

0 Likes
9,354

hi lakshmi,

whenever i clicked save button that time it will be shown message data successfully save in z table its fine but i want immediately data should be clear.

means when i fill data and save button message shown and then again one more  pop up window open and message shown "data not save in ztabel" and then clear the screen i dont want that message" data not save in ztabel"when i clicked save message shown and clear the data thats it.

tel me what should i do?

Read only

0 Likes
9,354

Hi rane,

I didn't write any code for second popup.

can you please paste your code for message and clear statements.

Read only

0 Likes
9,354

Hi Rane,

sorry i sent some wrong code.

clear all screen elements after modify statement.

clear : appno,

         name,

         mobileno,

         dat,

         male,

         female,

         SSC,

         HSC,

         DEGREE.

No need to write this statement.

MESSAGE 'DATA not saved in Ztable' TYPE 'I'.

Read only

0 Likes
9,354

hi lakshmi this my code for clear data and shown message

IF HSC = 'X' and SSC = 'X'.

    w_tab-HSC = 'HSC'.

    w_tab-SSC = 'SSC'.

   ELSEIF SSC = 'X' and DEGREE = 'X'.

     w_tab-SSC = 'SSC'.

     w_tab-degree = 'DEGREEE'.

   ELSEIF DEGREE = 'X' and HSC = 'X'.

      w_tab-degree = 'DEGREE'.

      w_tab-HSC = 'HSC'.

ENDIF.

APPEND w_tab to i_tab.

clear w_tab.

MODIFY ztable2 FROM table i_tab.

MODIFY ztable2 FROM table i_tab.

MESSAGE 'DATA successfully saved in Ztable2' TYPE 'I'.

MODIFY ztable2 FROM table i_tab.

MESSAGE 'DATA not saved in Ztable' TYPE 'I'.

clear : appno,

          name1,

          mono1,

          date1,

          male,

          female,

          SSC,

          HSC,

          DEGREE.

ENDIF.

Read only

0 Likes
9,354

Hi Rane,

Please delete some statments in your code which are i put on BOLD

IF HSC = 'X' and SSC = 'X'.

    w_tab-HSC = 'HSC'.

    w_tab-SSC = 'SSC'.

   ELSEIF SSC = 'X' and DEGREE = 'X'.

     w_tab-SSC = 'SSC'.

     w_tab-degree = 'DEGREEE'.

   ELSEIF DEGREE = 'X' and HSC = 'X'.

      w_tab-degree = 'DEGREE'.

      w_tab-HSC = 'HSC'.

ENDIF.

APPEND w_tab to i_tab.

clear w_tab.

MODIFY ztable2 FROM table i_tab.

MODIFY ztable2 FROM table i_tab.

MESSAGE 'DATA successfully saved in Ztable2' TYPE 'I'.

MODIFY ztable2 FROM table i_tab.

MESSAGE 'DATA not saved in Ztable' TYPE 'I'.

clear : appno,

          name1,

          mono1,

          date1,

          male,

          female,

          SSC,

          HSC,

          DEGREE.

Please delete above three statements which are in BOLD.

Read only

0 Likes
9,354

hi lakshmi ,

this problem is clear now.

but i was stuck in another problem

when ever i enter the application number say 29 , its displaying the records of 29.

then i press next button and enter the application number 22, the details are displaying for the application number 22, but when i press the back button , then apllication number is 30 ie.next application number and details are displaying for the application 22.

can u help me with this ?

this is my code below

TYPES : BEGIN OF t_ztab,

        appno TYPE ztable2-appno,

        name TYPE ztable2-name,

        mono TYPE ztable2-mono,

        zdate TYPE ztable2-zdate,

        male TYPE ztable2-male,

        female TYPE ztable2-female,

        ssc TYPE ztable2-ssc,

        hsc TYPE ztable2-hsc,

        degree TYPE ztable2-degree,

        education TYPE ztable2-education,

        gender TYPE ztable2-gender,

        End OF t_ztab.

DATA : i_tab TYPE  TABLE OF t_ztab,

       w_tab TYPE t_ztab.

DATA :     OK_CODE LIKE SY-UCOMM.

DATA : W_ssc TYPE c,

        W_hsc TYPE c,

        W_degree TYPE c,

        W_name1 TYPE c,

        W_aapno TYPE i,

        W_rad1 TYPE c,

        W_rad2 TYPE c,

        W_mono1 TYPE i,

        W_date1 TYPE SY-DATUM,

        W_save type c,

        W_exit type c,

        W_education type c,

        w_male TYPE c,

        w_female TYPE c,

        w_gender TYPE c.

DATA : v_num TYPE ztable2-appno.

DATA : appno(20) TYPE i,

       name1(30) TYPE c,

        mono1 TYPE ztable2-mono,

       date1 TYPE SY-DATUM ,

       rad1(10) TYPE c ,

       rad2(10) TYPE c ,

       ssc(10) TYPE c ,

       hsc(10) TYPE c ,

      degree(10) TYPE c ,

       save(10) TYPE c ,

       exit(10) TYPE c,

       education(10) TYPE c,

*      v_num(10) TYPE c,

       male(6) TYPE c,

       female(6) TYPE c,

       gender(10) TYPE c.

*DATA : date1 TYPE WORKFLDS-GKDAY.

START-OF-SELECTION.

*SELECT * from ztable2 into CORRESPONDING FIELDS OF TABLE it_ztab .

*----------------------------------------------------------------------*

*  MODULE STATUS_1000 OUTPUT

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

MODULE STATUS_1000 OUTPUT.

   SELECT SINGLE MAX( appno ) FROM ztable2 INto w_tab.

      SET PF-STATUS 'STATUS'.

*  SET TITLEBAR 'TITLE'.

   IF w_tab-appno is  INITIAL.

w_tab-appno = 1.

appno = w_tab-appno.

else.

v_num = w_tab-appno.

     if appno NE v_num.

      appno = v_num + 1.

    endif.

   endif.

ENdmodule.

MODULE USER_COMMAND_1000 INPUT.

IF sy-ucomm = 'SAVE'.

*   clear w_tab.

    w_tab-appno = appno.

    w_tab-name = name1.

    w_tab-mono = mono1.

    w_tab-zdate = DATe1.

   IF rad1 = 'X'.

     w_tab-gender = 'MALE'.

     w_tab-male = 'MALE'.

   elseif rad2 = 'X'.

     w_tab-gender = 'FEMALE'.

     w_tab-female = 'FEMALE'.

   ENDIF.

IF HSC = 'X' and SSC = 'X'.

    w_tab-HSC = 'HSC'.

    w_tab-SSC = 'SSC'.

   ELSEIF SSC = 'X' and DEGREE = 'X'.

     w_tab-SSC = 'SSC'.

     w_tab-degree = 'DEGREEE'.

   ELSEIF DEGREE = 'X' and HSC = 'X'.

      w_tab-degree = 'DEGREE'.

      w_tab-HSC = 'HSC'.

ENDIF.

APPEND w_tab to i_tab.

clear w_tab.

MODIFY ztable2 FROM table i_tab.

MODIFY ztable2 FROM table i_tab.

MESSAGE 'DATA successfully saved in Ztable2' TYPE 'I'.

*MODIFY ztable2 FROM table i_tab.

*MESSAGE 'DATA not saved in Ztable' TYPE 'I'.

clear : appno,

          name1,

          mono1,

          date1,

          male,

          female,

          SSC,

          HSC,

          DEGREE.

ENDIF.

IF sy-ucomm = 'EXIT'.

   leave to SCREEN 0.

ENDIF.

   CASE SY-UCOMM.

       WHEN 'NEXT'.

         call SCREEN 1002.

   ENDCASE.


MODULE USER_COMMAND_1002 INPUT.

IF sy-ucomm = 'SUBMIT'.

    CLEAR w_tab.

   SELECT SINGLE * FROM ztable2 INTO w_tab WHERE appno = appno.

    name1 = w_tab-name.

    mono1 = w_tab-mono.

    date1 = w_tab-zdate.

    IF w_tab-gender = 'MALE'.

      rad1 = 'X'.

    else.

      rad1 = ' '.

    ENDIF.

     IF w_tab-gender = 'FEMALE'.

      rad2 = 'X'.

    else.

      rad2 = ' '.

    ENDIF.

clear : ssc,hsc,degree.

if w_tab-ssc = 'SSC' and w_tab-hsc = 'HSC'.

    ssc = 'X'.

    hsc = 'X'.

    ELSEIF w_tab-hsc = 'HSC' and w_tab-degree = 'DEGREE'.

     hsc = 'X'.

     degree = 'X'.

   ELSEIF w_tab-degree = 'DEGREE' and w_tab-ssc = 'SSC'.

     ssc = 'X'.

     degree = 'X'.

endif.

ENDIF.

CASE SY-UCOMM.

   WHEN 'BACK'.

     call SCREEN 1000.

   WHEN 'EXIT'.

     LEAVE  TO SCREEN 0.

   WHEN OTHERS.

ENDCASE.

ENDMODULE.    

ENDMODULE.

Read only

0 Likes
9,354

Hi Rane,

I could not understand your requirement,

please paste screen shots of detail requirement.

Read only

0 Likes
9,354

hii  lskshmi

In 2nd screen

when i used to enter application number ,then i click on submit button, then data should be displayed on the 2nd screen.

when i click on back button on the same 2nd screen, it goes to ist screen but  data that is being displayed on the 2nd screen ,it is also displaying the same data on the 1st screen which i dont require.

My requirement is  i want the data should be displayed on the 2nd screen only which it is displaying .but i dont want the same data to be displayed on the 1st screen.

screen shot is below

help me out?

.

Read only

0 Likes
9,353

just check both screen?

pls help me?

what should i do???

Read only

0 Likes
9,352

hii  lskshmi

In 2nd screen

when i used to enter application number ,then i click on submit button, then data should be displayed on the 2nd screen.

when i click on back button on the same 2nd screen, it goes to ist screen but  data that is being displayed on the 2nd screen ,it is also displaying the same data on the 1st screen which i dont require.

My requirement is  i want the data should be displayed on the 2nd screen only which it is displaying .but i dont want the same data to be displayed on the 1st screen.

screen shot is below

help me out?

Read only

0 Likes
9,352

Hi Rane,

I think In Your 1st screen elements names and second screen elements name are same.

please change the names of your  second screen elements.

Read only

Former Member
0 Likes
9,352

hello gurus,

I was stuck in check box when i click 3 check box click then in my output only 2 check box check where is my mistake ?

pls help me?

this my code


IF HSC = 'X' and SSC = 'X'.

    w_tab-HSC = 'HSC'.

    w_tab-SSC = 'SSC'.

   ELSEIF SSC = 'X' and DEGREE = 'X'.

     w_tab-SSC = 'SSC'.

     w_tab-degree = 'DEGREEE'.

   ELSEIF DEGREE = 'X' and HSC = 'X'.

      w_tab-degree = 'DEGREE'.

      w_tab-HSC = 'HSC'.

ENDIF.

Read only

0 Likes
9,352

Hi rane,Do you want to click three check boxes at a time.