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

Executing BD87 in background from another program

Former Member
0 Likes
2,423

Hi Sir,

I have a scerario in which I have written a z program. Now in my z program i m generating an idoc no in status 64,yellow status.

Now I have to process the idoc by calling the tcode BD*& from within the z program and all this should rum in background.

I am facing following prob:

My program stops at first screen of BD87 itself. After that I have to press F8 manually..again I have to select the idoc and click on process button.

But all this should be automate.

Please guide.

Krishan

4 REPLIES 4
Read only

former_member404244
Active Contributor
1,223

Hi,

Use the program RBDAPP01 , this will change the status of 64 to 53 if success or 51 if any error. No need for BD87

Regards,

Nagaraj

Read only

GauthamV
Active Contributor
0 Likes
1,223

Create a background job for program RBDAPP01 and set it to daily,weekly..

based on your requirement.

This will automate the process of changing status from 64.

Read only

Former Member
0 Likes
1,223

if you know the IDOC number you can just make a call to function IDOC_INPUT


  data: l_input_method type inputmethd,
        l_input_succeeded type input_ok.

  l_input_method = 'E'.  "Foreground from errors

  refresh: t_unprocessed_idocs,
           t_idoc_data,
           t_idoc_control.

  t_unprocessed_idocs-docnum = '00000000' <<<<< put in IDOC number to be proccessed
  append t_unprocessed_idocs.

  call function 'IDOC_INPUT'
    exporting
      mass_processing          = c_false
      input_method             = l_input_method
      idoc_start_event_enabled = c_false
      end_event_enabled        = c_true
    importing
      input_succeeded_for_all  = l_input_succeeded
    tables
      unprocessed_idocs        = t_unprocessed_idocs
      idoc_data                = t_idoc_data
      idoc_control             = t_idoc_control
    exceptions
      others                   = 17.


Read only

Former Member
0 Likes
1,223

Hi Krishan,

Since this program is calling screen 100 from inside, so probably submit with the required fields may not work automatically.

You will have to try calling it using CALL TRANSACTION and populating the fields, and simulating the bdc code for execute. In this case, the code for execute is- CRET and not ONLI as in case of other normal se38 reports.

regards,

amit m.