‎2008 Aug 15 11:24 PM
Hi,
When I am executing this fm getting error as
*Type Items is unknown*
My requireemnt is
when i pass input as pernr to get result in items.
FUNCTION Z_GET_LINEITEMS.
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(P_PERNR) TYPE PERNR_D
*" EXPORTING
*" REFERENCE(VITEMS) TYPE ZVENDOR_ITEMS
*" TABLES
*" ITEMS STRUCTURE ZVENDOR_ITEMS
*"----
data: v_Stell type stell.
types: begin of h1001_typ,
rsign type rsign,
otype type otype,
subty type subty,
sclas type sclas,
objid type hrobjid,
sobid type sobid, "SOBID
pernr type p_pernr,
objid1 type hrobjid,
end of h1001_typ.
data: h1001_gt type standard table of h1001_typ initial size 0,
wa_h1001 type h1001_typ.
data: WA TYPE ITEMS.
select single stell from pa0001 into v_Stell where pernr = p_pernr and endda ge sy-datum and begda le sy-datum.
check sy-subrc = 0.
select otype sclas objid sobid subty rsign from hrp1001 into corresponding fields of table h1001_gt
where objid = V_stell and endda ge sy-datum and begda le sy-datum.
check sy-subrc = 0.
loop at h1001_gt into wa_h1001.
wa-pernr = p_pernr.
wa = wa_h1001-objid.
wa = wa_h1001-sobid.
append wa to items.
endloop.
ENDFUNCTION.
Thanks,
Asha
‎2008 Aug 16 12:27 AM