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

Former Member
0 Kudos

HI,

selection-screen begin of block b1 with frame title text-001.

selection-screen begin of line.

selection-screen comment (20) matnr .

parameters: p_matnr type mara-matnr obligatory.

selection-screen comment (40) maktx .

selection-screen end of line.

selection-screen end of block b1.

I'm using this code...

i'm displaying the description in the same line...

But not able to get MATERIAL (text element) infront of Material number field?

Plz help me...

8 REPLIES 8

Former Member
0 Kudos

use can use selection-texts.......

goto-textelements-selection texts.......in menu bar.....

n give MATERIAL for the parameter p_matnr.

Regards

Vasu

Former Member
0 Kudos

hi

use this...

selection-screen begin of block b1 with frame title text-001.

selection-screen begin of line.

parameters: p_matnr type mara-matnr obligatory.

selection-screen comment (20) v_matnr for FIELD p_matnr .

selection-screen end of line.

selection-screen end of block b1.

now in initialization. uwrite...

initialization.

v_matnr = 'MATERIAL'.

Former Member
0 Kudos

see the comment code from help

SELECTION-SCREEN COMMENT /1(50) comm1 MODIF ID mg1. 
SELECTION-SCREEN ULINE. 
SELECTION-SCREEN SKIP. 

SELECTION-SCREEN COMMENT /1(30) comm2. 
SELECTION-SCREEN ULINE /1(50). 
PARAMETERS: r1 RADIOBUTTON GROUP rad1, 
            r2 RADIOBUTTON GROUP rad1, 
            r3 RADIOBUTTON GROUP rad1. 
SELECTION-SCREEN ULINE /1(50). 

AT SELECTION-SCREEN OUTPUT. 
  comm1 ='Selection Screen'. 
  comm2 ='Select one'. 
  LOOP AT SCREEN. 
    IF screen-group1 = 'MG1'. 
       screen-intensified = '1'. 
      MODIFY SCREEN. 
    ENDIF. 
  ENDLOOP. 

Manohar2u
Active Contributor
0 Kudos

Go to selection texts and click on dictionary reference check box,,,then..

selection-screen begin of block b1 with frame title text-001.

*selection-screen begin of line.

*selection-screen comment (20) matnr .

parameters: p_matnr type mara-matnr obligatory.

*selection-screen comment (40) maktx .

*selection-screen end of line.

selection-screen end of block b1.

Former Member
0 Kudos

Hi Balu,

Using Comment statement :

SELECTION-SCREEN COMMENT (length) TEXT FOR FIELD P_MATNR

TEXT can be a name or text symbol.

use text symbol like this and make sure that is active.

selection-screen comment (20) text-002 for field p_matnr.

Regards

Venkat.

Award me with points, if given tip is useful.

Former Member
0 Kudos

hi,

give like this...

selection-screen begin of block b1 with frame title text-001.

selection-screen begin of line.

SELECTION-SCREEN COMMENT 5(20) TEXT-203.

SELECTION-SCREEN POSITION 28.

parameters: p_matnr type mara-matnr obligatory.

selection-screen end of line.

selection-screen end of block b1.

regards,

priya.

Former Member
0 Kudos

Hi,

If I understood the your requirement correctly, you want to display the description of the material in the same line.

Try to use the following code....

-


selection-screen begin of block b1 with frame title text-001.

selection-screen begin of line.

selection-screen comment 1(10) matnr .

parameters: p_matnr type mara-matnr obligatory.

selection-screen comment 35(40) maktx .

selection-screen end of line.

selection-screen end of block b1.

initialization.

move text-002 to matnr.

at selection-screen on p_matnr.

select single maktx into maktx from makt where

spras = sy-langu and matnr = p_matnr.

-


The above code will display text element text-002 at position 1 in front of the Parameter Field and the material description at position 35 as soon as you press enter after selecting the material on the same line.

Reward if answer is useful.

Regards,

Hema

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


REPORT ZZTEST.

TABLES: MARA, MAKT.
                                                                        
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(20) T_MATNR.
PARAMETERS: P_MATNR LIKE MARA-MATNR.
SELECTION-SCREEN: COMMENT 50(40) T_DESC.
SELECTION-SCREEN: END OF LINE.
                                                                        
DATA: DYNFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
  DATA: RETURN_TAB TYPE TABLE OF DDSHRETVAL WITH HEADER LINE.
  DATA: X_MATNR LIKE MARA-MATNR.
                                                                        
  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
      TABNAME    = 'MARA'
      FIELDNAME  = 'MATNR'
    TABLES
      RETURN_TAB = RETURN_TAB.

  READ TABLE RETURN_TAB INDEX 1.
  CHECK SY-SUBRC = 0.

  DYNFIELDS-FIELDNAME = 'P_MATNR'.
  WRITE RETURN_TAB-FIELDVAL TO DYNFIELDS-FIELDVALUE.
  APPEND DYNFIELDS.

  X_MATNR = DYNFIELDS-FIELDVALUE.
  DYNFIELDS-FIELDNAME = 'T_DESC'.
  SELECT SINGLE * FROM MAKT WHERE MATNR = X_MATNR.
  WRITE MAKT-MAKTX TO DYNFIELDS-FIELDVALUE.
  APPEND DYNFIELDS.

  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      DYNAME     = SY-REPID
      DYNUMB     = SY-DYNNR
    TABLES
      DYNPFIELDS = DYNFIELDS.
                                                                        
INITIALIZATION.
  T_MATNR = 'Material Number'.
  T_DESC = SPACE.

Regards,

Ferry Lianto