Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Field - Symbol - Abap HR

Hi expert , i need your clue.

to be honest, there is a field in my report that should be has the value related date-work.

just called this field with = field A.

field A value is taken from table pa0041.

at transparant table pa0041, there are 8 field from dar01 to dar08.

                                                also 8 field from dat01 to dat08.

dar01 related to dat01, also dar02 related to dat02,

in my case, i have to find the value 'Z1' from dar01 up to dar08.

just mention if the value of 'Z1' at field dar03. So i will take the value

of dat03 (related to dar03) into field A.

first, i use command "case and end case" for this matter.

but it is not recommended because too many case i have to mention,

Anybody know to solve this problem with Field Symbol ?

@admin : thanks for approve my question

Former Member
replied

Hi Barnabas,

This does exactly what you are trying to do : the PO release strategy has 8 fields.  I want to know the first field that is filled (I have changed the code slightly so it fits your needs).  This is how it works.

  DATA :

    ls_t16fs TYPE t16fs,

    l_fname TYPE rollname,

    l_counter TYPE i VALUE 1.

  FIELD-SYMBOLS :

    <l_frgco> TYPE frgco.

**Get release strategy

  SELECT SINGLE * FROM t16fs

         INTO ls_t16fs

         WHERE frggr EQ i_header-frggr

           AND frgsx EQ i_header-frgsx.

**Get relevant release codes

  WHILE l_counter LE 8.

    l_fname = 'FRGC' && l_counter.

    ASSIGN COMPONENT l_fname OF STRUCTURE ls_t16fs TO <l_frgco>.

    IF <l_frgco> IS ASSIGNED.

      EXIT.

    ENDIF.

**..Increase counter for next release code

    ADD 1 TO l_counter.

  ENDWHILE.

Regards,

Freek

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question