Skip to Content
author's profile photo Former Member
Former Member

how can create customiz field lable at 'REUSE_ALV_FIELDCATALOG_MERGE'

HI All.

i am using FM 'REUSE_ALV_FIELDCATALOG_MERGE'.its fetching field label from domain.i want give customize field name.how can i ? pls help me.

Reward all helpfull answers.

Regards.

Krishna.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 12:15 PM

    After getting the data from FM , modify the field label according

    to your requirement ...

    Add a comment
    10|10000 characters needed characters exceeded

    • CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
             EXPORTING
                  i_program_name         = sy-repid
                  i_internal_tabname     = 'ITAB'
                  i_inclname             = sy-repid
             CHANGING
                  ct_fieldcat            = it_fieldcat[]
             EXCEPTIONS
                  inconsistent_interface = 1
                  program_error          = 2
                  OTHERS                 = 3.

      Now loop the fieldcatalog and change the Text.

      LOOP AT IT_FIELDCAT WHERE FIELDNAME = 'VBELN'.
      
      IT_FIELDCAT-SELTEXT_L = 'Sales Order Number'.
      
      IT_FIELDCAT-SELTEXT_M = 'Sales Order'.
      
      Modify IT_FIELDCAT. 
      ENDLOOP.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 12:25 PM

    Check this code block..may be it will help u...

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    i_structure_name = 'BDI_LSHDR'

    CHANGING

    ct_fieldcat = pt_fieldcat[]

    EXCEPTIONS

    inconsistent_interface = 1

    program_error = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    *--Exception handling

    ENDIF.

    LOOP AT pt_fieldcat INTO ls_fcat .

    CASE ls_fcat-fieldname .

    WHEN 'cdate' .

    ls_fcat-seltext_m = 'date' .

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'ctime' .

    ls_fcat-seltext_m = 'time' .

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'logsys_old' .

    ls_fcat-seltext_m = 'old logical system' .

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'logsys_new' .

    ls_fcat-seltext_m = 'new logical system' .

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'counter' .

    ls_fcat-seltext_m = 'counter' .

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'status' .

    ls_fcat-seltext_m = 'conversion' .

    ls_fcat-checkbox = 'x'.

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'initiator' .

    ls_fcat-seltext_m = 'initiator' .

    ls_fcat-ddictxt = 'm'.

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'cuid' .

    ls_fcat-no_out = 'x' .

    ls_fcat-key = 'x' .

    MODIFY pt_fieldcat FROM ls_fcat .

    WHEN 'traffic_light' .

    ls_fcat-seltext_m = 'status'.

    ls_fcat-ddictxt = 'm'.

    ls_fcat-tabname = 'status'.

    ls_fcat-col_pos = 0.

    ls_fcat-outputlen = 10.

    ls_fcat-emphasize = 'x'.

    MODIFY pt_fieldcat FROM ls_fcat .

    ENDCASE .

    ENDLOOP .

    Regards,

    Joy.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 12:31 PM

    clear it_fieldcat[].

    call function 'REUSE_ALV_FIELDCATALOG_MERGE'

    exporting

    i_program_name = v_repid

    i_internal_tabname = 'IT_RES'

    i_client_never_display = c_x

    i_inclname = v_repid

    changing

    ct_fieldcat = it_fieldcat

    exceptions

    inconsistent_interface = 1

    program_error = 2

    others = 3.

    if sy-subrc = 0.

    *---Subroutine to modify the fieldcat with required headings

    perform modify_fieldcat.

    endif.

    loop at it_fieldcat into wa_fieldcat.

    case wa_fieldcat-fieldname.

    when c_ebeln.

    *--To Set Fieldcatalog

    perform set_field_catalog using 'PO No'(009)

    'PO No'(009)

    'PO Number'(010)

    'PO Number'(010)

    c_x

    ''.

    when c_ebelp.

    *--To Set Fieldcatalog

    perform set_field_catalog using 'PO Item'(011)

    'PO Item No'(012)

    'PO Item Number'(013)

    'PO Item Number'(013)

    c_x

    ''.

    endcase.

    modify it_fieldcat from wa_fieldcat

    transporting seltext_s

    seltext_m

    seltext_l

    reptext_ddic

    fix_column

    key.

    endloop.

    form set_field_catalog using p_v_small_txt type any

    p_v_med_txt type any

    p_v_large_txt type any

    p_v_rep_txt type any

    p_v_fix_column type any

    p_v_key type any.

    clear wa_fieldcat.

    wa_fieldcat-seltext_s = p_v_small_txt.

    wa_fieldcat-seltext_m = p_v_med_txt.

    wa_fieldcat-seltext_l = p_v_large_txt.

    wa_fieldcat-reptext_ddic = p_v_rep_txt.

    wa_fieldcat-fix_column = p_v_fix_column.

    wa_fieldcat-key = p_v_key.

    endform. "set_field_catalog

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.