‎2008 Aug 30 12:15 PM
Hi Experts,
I've assigned an Exit for MIRO-Substitution as 'UPCT' in Form routine under report program 'ZRGGBS000'.
In that I've to update the field of PRCTR for particular GL Account. The details of invoices available in bseg table parameter. I've to write a coding part where Im facing problem while looping.
When I do loop at bseg ,it's saying an error as 'Version' expected after BSEG.
Pls check below and reply me with example code .
************
data: v_prctr type prctr.
select single prctr into v_prctr from marc where matnr eq bseg-matnr.
if sy-subrc eq 0.
loop at bseg where hkont = '0000300016'.
if bseg-prctr ne v_prctr.
bseg-prctr = v_prctr.
endif.
endloop.
endif.
*********************************
My requirement is Thru material I'll get a Profit center value where the same I've to update in line item of particular GL account.
Pls advise.
Thanks & Regards
sankar.
‎2008 Aug 30 12:17 PM
You cannot loop at bseg .
i think its not a itab.
Check if any other way like moving it to a seperate itab and looping.
‎2008 Aug 30 1:41 PM
‎2008 Aug 30 1:47 PM
‎2008 Aug 30 2:09 PM
Hi KPN,
no ouput for RSEG and RKPF....
pls advise.
thanks®ards
sankar.
‎2008 Aug 30 2:13 PM
‎2008 Aug 30 4:32 PM
Hi KPN,
Sorry for the delay in reply.
the table what u've written is right but it no way help me in this Form routine exit.
I want to update the value to Profit center field for Price difference GL Account which will be derived only at the time of posting MIRO.
FYI: Pls go thru the std report,I've copied it into Z report and assigned a Form routine and inside to that I've to declare my coding part.
Report : RGGBS000.
Regards
Sankar.
Edited by: sankar babu on Aug 31, 2008 7:48 AM
‎2008 Aug 31 7:11 AM
Closed with export and import.
thanks for ur replies.
regards
sankar.