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: 

size issue in dropdown in modulepool

Former Member
0 Kudos

Hi all,

       i have created two drop down boxes, first one is of length 80 characters. based on the value of the first drop down list i have to take the second drop down list.

my problem is while comparing in the second drop down list based on the first one the first one is showing only 40 characters of data instead of showing 80 characters data.

                                Thanks to all,

regards,

hemanth.

1 ACCEPTED SOLUTION

Former Member

This message was moderated.

12 REPLIES 12

Former Member

This message was moderated.

0 Kudos

You could try to post a screen shot so people will understand your problem ?

Regards,

Raymond

0 Kudos

Dear giuseppi,

when is press display the total text is not binding in the below box, it is restricting to 40 characters.

0 Kudos

code is,

data size_60 type ZCLM_SERV_QUEST-CLMTYPE.

data DISPLAY_SIZE type ZCLM_SERV_QUEST-CLMTYPE.

data return_tab type table of DDSHRETVAL.

TYPES: BEGIN OF ty_clm,

   QUESTION type ZQUESTION_D,

   END OF ty_clm.

  data it_CLMTYPE type table of ty_clm.

data it type table of zclm_serv_quest.

START-OF-SELECTION.

   CALL SCREEN 1000.

module CREATE_DPDN input.

   Select QUESTION from zclm_serv_quest into TABLE it_CLMTYPE.

       DELETE ADJACENT DUPLICATES FROM it_CLMTYPE.

        if it_CLMTYPE is not INITIAL.

             CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

                 EXPORTING

                    retfield               = 'QUESTION'

                    VALUE_ORG              = 'S'

                 TABLES

                    value_tab              = it_clmtype.

             ENDIF.

endmodule.                 " CREATE_DPDN  INPUT

*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_1000  INPUT

*&---------------------------------------------------------------------*

*       text

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

module USER_COMMAND_1000 input.

   case sy-ucomm.

     when 'DISPLAY'.

DISPLAY_SIZE = size_60.

*      select * from zclm_serv_quest into table it FOR ALL ENTRIES IN size60 where CLMTYPE = SIZE_60.

         when 'BACK'.

           LEAVE TO SCREEN 0.

         ENDCASE.

endmodule.                 " USER_COMMAND_1000  INPUT

0 Kudos

Did you use VRM_SET_VALUES, I suppose you filled the internal table with some key (≤ 40 character) and text (≤ 80 characters) and displayed the text, but in PAI the key is returned to program, and not the text, so you have to look in the internal table used to set values to get the text value, else you wont get more than 40 characters ?

Regards,

Raymond

0 Kudos

Hi Hemanth,

The key is limited up-to 40 characters because the structure for key type is set as 40 characters for VRM_SET_VALUES as shown below.

Use key concept as shown below

The above table 'ZHR_DEPT_VAL', contains key and description.


FORM add_list.
  
TYPE-POOLS: vrm.

  
DATA: name  TYPE vrm_id,
         list 
TYPE vrm_values,
        
value LIKE LINE OF list.

  
DATA: it_dept TYPE TABLE OF zhr_dept_val,
         wa_dept
TYPE zhr_dept_val.

   name
= 'ZHR_MAINTAIN_DPT-DEPT'.

  
REFRESH list.

  
SELECT *
         
FROM zhr_dept_val
         
INTO TABLE it_dept.
  
IF sy-subrc = 0.

    
LOOP AT it_dept INTO wa_dept.

              value-key = wa_dept-dept_key.
      
value-text = wa_dept-dept_desc.
      
APPEND value TO list.
      
CLEAR value.
    
ENDLOOP.

    
SORT list BY key.

    
CALL FUNCTION 'VRM_SET_VALUES'
      
EXPORTING
        
id     = name
         values
= list.
  
ENDIF.
ENDFORM.                    "add_list

The above code represents to display the value in List box. Write the code if display button is clicked.


MODULE user_command INPUT.

   DATA: l_ucomm TYPE sy-ucomm.

   l_ucomm = sy-ucomm.

   CASE l_ucomm.

     WHEN 'DISPLAY'.

      SELECT SINGLE DEPT_DESC

                     FROM ZHR_DEPT_VAL

                      INTO L_DESC

                      WHERE DEPT_KEY = ZHR_MAINTAIN_DPT-DEPT.

     IF SY-SURBC = 0.

      ZHR_MAINTAIN_DPT-DEPT_DESC = L_DESC.

     ENDIF.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND  INPUT

Regards

Rajkumar Narasimman

0 Kudos

Hi Rajkumar Narasimman,

                                       But in my table there are 5 key fields. Is thair any way to display the text instead of key.

Thanks And Regards,

Hemanth Reddy.

0 Kudos

Hi Hemanth,

We can display the text in the list box as shown above.

If you have multiple keys, we can also concatenate the keys using separator as shown below. But the key value should not extend 40 characters.

Ex:

key1-key2-key3-key4-key5

Regards

Rajkumar Narasimman

former_member183607
Contributor
0 Kudos

Hi,

     Check The Key is of 40 characters in VRM , You are using Text or Key for Comparision.

          KEY(40) TYPE C,
          TEXT(80) TYPE C,

0 Kudos

I want to use text to display, by default its displaying  key only.

0 Kudos

create a Text area i think using custom container?

Former Member
0 Kudos

Hi all,

      Thanks to all replyers . I got this one

Thanks & Regards,

Hemanth.