cancel
Showing results for 
Search instead for 
Did you mean: 

sap script loop item text(bseg-sgtxt)

Former Member
0 Kudos

Hi Experts,

I created sap script for payment print prog and for that i use standard prog RFFOUS_C. in script one window is item text. if i created two document for same vendor(belnr) so in script item text should be two times because two document i have posted for same vendor. for that i use bseg-sgtxt and bseg-wrbtr. how can i use loop in this logic or on change of or at new belnr..

so can u give me logic for that.

Its urgent....

Thanks

Vishal

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Loop to the document numebr and take the ID language and OBJECT then call ther READ_TEXT function module pass the those parameters and import the item text (U sing importing parameter or table statement).

then concatenate ther text into another varaiable (v_text).

sofor secodn iteration also the text will be concatenated into v_text)/

Reward points if useful or get back if you need further help.

Regards,

Nageswar

Former Member
0 Kudos

Hi Nagesh,

client req is like below:

item text amount

xyz 1000

abc 2000

pqr 3000

so how can i move loop in the program or sap script??

Thanks

Vishal

Former Member
0 Kudos

Hi,

r u gettingt these values in your program RFFOUS_C.

Can you copy this program into Z report . if not what are other parameters you have in your script so that you can retrieve the required values using the other parameters by defining subroutines in youe script.

If this is not the case . I think it is difficult for you to explain the probelm and for to understand. So better send me your spec so that I will explain you.

Regards,

Nageswar