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

Read contents of attribute G_FIELDCATALOG from class CL_ISHMED_PATORG

Hi,

Now we are working with the patient organizer in ISH, we can add some fields to the ALV with badi N1PATORG_APPEND.

One of our field contains an icon. Since note 1111167 it's possible to add an Icon-field with this BADI.

In the badi I have an import parameter IR_PATORG type ref to CL_ISHMED_PATORG.

One of the attributes is G_FIELDCATALOG and I like to changes this attribute.

How can I get the values of this attribute in an internal table to change them ???

Hopefully you can provide a solution !

Kind regards,

Gert-Jan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 27, 2008 at 05:00 AM

    Hello Gert-Jan

    If you look at the attribute list of class CL_ISHMED_PATORG you can see that G_FIELDCATALOG (of TYPE lvc_t_fcat) is a public instance attribute and it is NOT read-only meaning you can directly manipulate it.

    METHOD if_ex_n1patorg_append~fill_sort.
    * define local data
      DATA: ls_fcat     TYPE lvc_s_fcat.
    
    " Example: hide columns
      READ TABLE ir_patorg->g_fieldcatalog INTO ls_fcat INDEX 1.
      IF ( syst-subrc = 0 ).
        ls_fcat-no_out = 'X'.
        MODIFY ir_patorg->g_fieldcatalog FROM ls_fcat INDEX syst-tabix.
      ENDIF.  
    
    " Example: add new column
    " ...Fill LS_FCAT with required values
      APPEND ls_fcat TO ir_patorg->g_fieldcatalog.
    
    ENDMETHOD.
    

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2008 at 12:13 PM

    Hi Uwe,

    This was exactly where I was looking for.

    Thank you very much !

    GJ

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Gert-Jan

      Do not be afraid of the apparent "complexity" of the classes you are using. The more you work with classes the better you will understand their "logic". And, most importantly,

      if you once have understood a class in its entirety you will understand virtually ALL classes.

      Regards

      Uwe

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.