Skip to Content
0
Former Member
Apr 22, 2010 at 05:53 PM

Error in 4.5b system: Offset specification is not a numeric literal

93 Views

Hi,

from BSEG table, i need to find material docu and item which is getting stored in SGTXT field of BSEG.

Now since it is a CHAR 50 Field , there is no proper offset where we can find the Material doc and item.

For ex: SGTXT Could be = jibiibom ijo para doc. mat. 4918861754, 0001

and some time it could be = nsfuk sdfsde eer 4918861754 0001.

So dynamically i need to find the values of Material doc and item and than need to query on MSEG to get other data.

I am able to break this SGTXT Dynamically like

l_sgtxt = wa_bseg-sgtxt.

  if l_sgtxt ca '0123456789'.
   if sy-subrc eq 0.
      f_pos_mblnr = sy-fdpos.
   endif.
  endif.
  f_pos_mblnr = f_pos_mblnr + 10.

replace l_sgtxt length f_pos_mblnr with space into l_sgtxt.
condense l_sgtxt.

    if l_sgtxt ca '0123456789'.
     if sy-subrc eq 0.
       f_pos_zeile = sy-fdpos.
     endif.
    endif.

select single matnr werks menge meins
    from mseg
    into wa_mseg
where mblnr = wa_bseg-sgtxt+f_pos_mblnr(10)
and   mjahr = wa_bseg-zuonr+10(4)
and   zeile = wa_bseg-sgtxt+f_pos_zeile(4).

but when i query on MSEG Using the above thing SGTXT+FPOS_MBLNR is not allowed..

Regards,

Mayank