Application Development 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: 

How to call 'POSTING_INTERFACE_CLEARING' in background

Former Member
0 Kudos

Dear ALL,

I am calling the Function Module 'POSTING_INTERFACE_CLEARING' from the custom program. I am passing the following import parameters. Please look at the code section:

 CALL FUNCTION 'POSTING_INTERFACE_CLEARING'
    EXPORTING
      i_auglv                    = lc_auglv
      i_tcode                    = lc_tcode
      i_sgfunct                  = lc_sgfunct

Now what it does it calls the FB05 transaction in CALL TRANSACTION mode in foreground. What I need is to execute the transaction in background. Only incase of errors it should come to the foreground. Can anyone tell me how to do it or any sugesstions...

1 ACCEPTED SOLUTION

former_member194797
Active Contributor
0 Kudos

Hi,

in my case I'm using


  CALL FUNCTION 'POSTING_INTERFACE_START'  
    EXPORTING                              
      I_FUNCTION               = 'C'       
      I_MODE                   = WWMODE    
      I_UPDATE                 = 'S'       
    EXCEPTIONS                             
     CLIENT_INCORRECT         = 1          
     FUNCTION_INVALID         = 2          
     GROUP_NAME_MISSING       = 3          
     MODE_INVALID             = 4          
     UPDATE_INVALID           = 5          
     OTHERS                   = 6.               

with wwmode 'A', all the screens are displayed; with 'E' only the screens containing errors, and with 'N' no screen is displayed.

I tested the 3 cases and it works. Did you try with I_FUNCTION = 'C' ?

6 REPLIES 6

former_member194797
Active Contributor
0 Kudos

Hi,

I think you should first call FUNCTION POSTING_INTERFACE_START with I_MODE = 'E' then call 'POSTING_INTERFACE_CLEARING' .

Former Member
0 Kudos

Thanks for the reply...but the Function Module that you have mentioned should be used for definning the batch...incase you are using a BDC session method, but I am trying to use it in the CALL TRANSACTION mode. I think it might work if we use it in an

CALL FUNCTION 'POSTING_INTERFACE_CLEARING' IN BACKGROUND TASK
 COMMIT WORK 

I wiil try this

....Lemme c...Incase you any information please update....

Thanks

0 Kudos

Its not working...,

former_member194797
Active Contributor
0 Kudos

Hi,

in my case I'm using


  CALL FUNCTION 'POSTING_INTERFACE_START'  
    EXPORTING                              
      I_FUNCTION               = 'C'       
      I_MODE                   = WWMODE    
      I_UPDATE                 = 'S'       
    EXCEPTIONS                             
     CLIENT_INCORRECT         = 1          
     FUNCTION_INVALID         = 2          
     GROUP_NAME_MISSING       = 3          
     MODE_INVALID             = 4          
     UPDATE_INVALID           = 5          
     OTHERS                   = 6.               

with wwmode 'A', all the screens are displayed; with 'E' only the screens containing errors, and with 'N' no screen is displayed.

I tested the 3 cases and it works. Did you try with I_FUNCTION = 'C' ?

Former Member
0 Kudos

Thanks for the reply...In your case you are using the session method. I will implement the sugesstion given by you.

Thank You

Tanmoy

Former Member
0 Kudos

Yes...its done

Thanks