02-01-2009 3:11 PM
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.
02-01-2009 3:18 PM
Change
data wa_shlp type SHLP_DESCR-fielddescr.
to
data wa_shlp LIKE shlp-fielddescr.
The table and the workarea which you want to read the table record INTO should be of same type.
02-01-2009 3:17 PM
02-01-2009 3:18 PM
Change
data wa_shlp type SHLP_DESCR-fielddescr.
to
data wa_shlp LIKE shlp-fielddescr.
The table and the workarea which you want to read the table record INTO should be of same type.
02-01-2009 3:36 PM
wishu this is not working I get the message
shlp_descr must be a flat structure ....
02-01-2009 3:41 PM
Could you please post the full coding, along with all the data declarations?
02-01-2009 3:45 PM
FUNCTION ZSHELPEXIT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" REFERENCE(ZVPSTA) TYPE ZVPSTA OPTIONAL
*" VALUE(SHLP) TYPE SHLP_DESCR OPTIONAL
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*" OPTIONAL
*"----------------------------------------------------------------------
*data wa_shlp type SHLP_DESCR-fielddescr.
data wa_shlp like shlp-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.
ENDUFNCTION.
02-01-2009 3:47 PM
Hi, Ilhan Ertas
i think that you are doing some where like this .
DATA shlp_descr like shlp_descr.
Please Change this with the following Hope will solve out.
DATA shlp_descr TYPE shlp_descr.
Kind Regards,
Faisal
02-01-2009 4:00 PM
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
02-01-2009 4:00 PM
Hi,
use like this
wa_shlp like line of SHLP-FIELDDESCR.
кu03B1ятu03B9к