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 &memory

Former Member
0 Likes
1,185

When we call a function, SAP will be the current functions of all the elements in the set of loading into the abap memory.

Problem is when I finish this function how to clear the memory.

FOR EXAMPLE : BAPI_OUTB_DELIVERY_CONFIRM_DEC

                                      internal  table: XVBFA

                                  update VAFA

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,098

Not sure to understand

SAP will be the current functions of all the elements in the set of loading into the abap memory.

Nevertheless, just analyze the main program  (function group) source you should easily find FORM INITIALIZE, in  the caller execute a PERFORM INITIALIZE(SAPLV50I)

Which kind of error did you get, you may look also for OSS notes as some called function group may not refresh their data (e.g. a missing PM_PARTNER_REFRESH_ALL or a similar common tool)

Regards,

Raymond

8 REPLIES 8
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,099

Not sure to understand

SAP will be the current functions of all the elements in the set of loading into the abap memory.

Nevertheless, just analyze the main program  (function group) source you should easily find FORM INITIALIZE, in  the caller execute a PERFORM INITIALIZE(SAPLV50I)

Which kind of error did you get, you may look also for OSS notes as some called function group may not refresh their data (e.g. a missing PM_PARTNER_REFRESH_ALL or a similar common tool)

Regards,

Raymond

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,098

Nebula,

     May I know why you need to clear the memory? What issue you face?

Read only

Former Member
0 Likes
1,098

hi

my questions:

When I create sales order in quantity.

The business process :

(1) Sales Order Creation :  BAPI_SALESORDER_CREATEFROMDAT2 

(2) Delivery Creation (According to the sales order configuration is automatically created)

(3) Post Goods Issue of Delivery : BAPI_OUTB_DELIVERY_CONFIRM_DEC

when the second time  create sales order

Read only

0 Likes
1,098

Nebula,

     Loop that sales order internal table and perform your business process.

          loop at iSalesOrder.

               CLEAR:   Internal tables[]. "That needs to be passed to each function.

               Your business process (1), (2) and (3).

          endloop.

Read only

0 Likes
1,098

An error generated when update sales document flow.

Reason is  produce data has not been cleared while the first Post Goods Issue of Delivery.

postion :

CALL FUNCTION 'RV_DELIVERIES_SAVE' IN UPDATE TASK.

internal table : xvbfa

Read only

0 Likes
1,098

I now use is the solution.

But I'm not sure if it will impact the business.

Regards,

Read only

Former Member
0 Likes
1,098

Try these function modules.

BKKT_BKKA_EVENT_DLVE1           - Initialize Local Memory

BKKT_BKKA_EVENT_DLVE2           - Initialize Global Memory

BCA_BUPA_EVENT_DLVE2             - Initialize current Memory

Read only

Former Member
0 Likes
1,098

Hi,

  If you have to clear tables, you can use the following user exit to write the refresh statements

Sales order: MV45AFZA - USEREXIT_REFRESH_DOCUMENT

Delivery : MV50AFZ1 -  USEREXIT_REFRESH_DOCUMENT

For clearing tables after PGI, check the following condition in the delivery exit(MV50AFZ1 -  USEREXIT_REFRESH_DOCUMENT),

IF KOMKBV2-WBSTK = 'C'.

  ENDIF.

Thanks,

Vijaya.