Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Coding Error in Exit substitution

Former Member
0 Likes
998

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.

7 REPLIES 7
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
886

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.

Read only

Former Member
0 Likes
886

Any solutions...

Pls reply.

Regards

sankar.

Read only

0 Likes
886

check these tables RBKP,RSEG

Read only

0 Likes
886

Hi KPN,

no ouput for RSEG and RKPF....

pls advise.

thanks&regards

sankar.

Read only

0 Likes
886

alternative for bseg tables are BSIS,BSAS,BSIK,BSAK

BSID,BSAD.

Read only

0 Likes
886

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

Read only

Former Member
0 Likes
886

Closed with export and import.

thanks for ur replies.

regards

sankar.