Skip to Content

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

cannot be converted to line type - without a header line

Hi Experts,

I get the error messages:

1) wa_shlp cannot be converted to line type of "SHLP-FIELDDESCR"

2) wa_shlp is a table without a header line and therefore has no component called offset

What has to be done to fix these errors.

Regards

ertas


data wa_shlp type SHLP_DESCR-fielddescr.

Loop at record_tab.
	read table shlp-fielddescr into wa_shlp
                                   with key tabname   = 'M_PREMN'
                                            fieldname = 'PERNR'.
      select  orgeh endda
        up to 1 rows
        from pa0001
        into (ld_orgeh,ld_endda)
       where pernr eq record_tab-string+wa_shlp-offset(8)
                                                  u201Cpernr length is 8
       order by endda descending.
      endselect.

      select single orgtx
        from t527x
        into ld_orgtxt
       where orgeh eq ld_orgeh and
             sprsl eq sy-langu and
           ( endda ge sy-datum and
             begda le sy-datum ).


  concatenate record_tab-string ld_orgtxt into record_tab-string.
  modify record_tab.
endloop.

Tags:
replied

Hi, Ilhan Ertas

I did little change there is no error message but I am not sure that it will full fill your requirement or not but you can get some help from the following code.

DATA: wa_shlp TYPE dfies,
      ld_orgeh like pa0001-orgeh,
      ld_endda like pa0001-endda,
      ld_orgtxt like t527x-orgtx.

  LOOP AT record_tab.
    READ TABLE shlp_tab-fielddescr INTO wa_shlp
                                     WITH KEY tabname   = 'M_PREMN'
                                              fieldname = 'PERNR'.
    SELECT  orgeh endda
      UP TO 1 ROWS
      FROM pa0001
      INTO (ld_orgeh,ld_endda)
     WHERE pernr EQ record_tab-string+wa_shlp-offset(8)
*                                                u201CPERNR length IS 8
     ORDER BY endda DESCENDING.
    ENDSELECT.

    SELECT SINGLE orgtx
      FROM t527x
      INTO ld_orgtxt
     WHERE orgeh EQ ld_orgeh AND
           sprsl EQ sy-langu AND
         ( endda GE sy-datum AND
           begda LE sy-datum ).

    CONCATENATE record_tab-string ld_orgtxt INTO record_tab-string.
    MODIFY record_tab.
  ENDLOOP.

Kind Regards,

Faisal

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