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

Function module inside a loop

Former Member
0 Likes
810

Hi Experts,

I am using a FM 'PRICING_SUBSCREEN_PBO' inside a loop.

This FM should work for all the line items in a contract . But my issue is that this works only for the first line item and not populating the required tables . This happens because inside the FM two internal tables are getting polpulated in the first iteration,in the second iteration there are read statements from these tables ,which will end up in exit from FM without populating the required output tables,in case of succesful read statements.

I want all the internal table inside the FM to be cleared after first iteration. What to do.

Is there any way to reset the FM ?

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
614

Hi,

Since this is a standard pricing subroutine it seems it is not approprite to use this FM .

Refer this link for other FM:

Regards,

Neha

4 REPLIES 4
Read only

Former Member
0 Likes
614

hai i think

u have to use commit

after this FM

ie., BAPI_transaction_commit

Read only

Former Member
0 Likes
614

Hi,

Try refreshing the internal tables used to pass/get values to/from the FM.

See F1 help for REFRESH.

Regards

Karthik D

Read only

0 Likes
614

I have done , REFRESH for all the tables getting values and that passing values into the FM. The FM works fine for the first line item . For the second line item onwards it is not populating the required tables due to some already filled tables inside the FM .

BAPI_TRANSACTION_COMMIT also doent work.

Read only

Former Member
0 Likes
615

Hi,

Since this is a standard pricing subroutine it seems it is not approprite to use this FM .

Refer this link for other FM:

Regards,

Neha