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

Automatic BD20 execution after creating IDoc

Former Member
0 Likes
1,317

Hi,

I am working on an inbound IDoc.When I execute my report if the data that I pass for IDoc creation is valid IDOc will be generated .

There is an additional requirement after the creation of IDoc ,the user should be taken to a screen like BD20 output screen which gives details like

IDOC number | Message Type | Serial Info | St | Description

For this to work the the new IDoc's IDoc number should be given as input to the BD20 transaction.

If you double click on this it should take you to the WE02 screen.

Can you please help me out with this.

Thanks in advance.Points will be rewarded.

Regards,

Reni

2 REPLIES 2
Read only

Former Member
0 Likes
815

Reni, seems like you have to develop a drill down report, interactive report.

But rather than using BD20 and then WE02, try BD87 , which will give them both processing and viewing capability.

I have not written reports for some time now , but drill down reports are not tough, its all about hide and set pf-status? etc.

CHeck SAP's documentation on this.

Regards

Read only

Former Member
0 Likes
815

Hi Reni,

You can build simple report like BD20 to collect all inbound IDocs based on selection screen for monitoring purposes. Then use FM EDI_DOCUMENT_TREE_DISPLAY to display the IDoc like WE02 from report list (using hotspot).

You can do something like this ...


FORM WRITE_AUDIT_REPORT .
  SKIP 1.
  WRITE:/35  'IDOC AUDIT REPORT'(749) COLOR COL_NORMAL.
  WRITE:/ SY-ULINE AS LINE.
  FORMAT COLOR OFF.
     
  FORMAT COLOR OFF.
  SKIP 3.

  LOOP AT IT_IDOC.
    PERFORM ALTERNATE_COLOR.
    WRITE:/10 'IDOC NUMBER :'(737) COLOR COL_KEY. 
    FORMAT COLOR OFF.
    WRITE:28 IT_IDOC-DOCNUM HOTSPOT.
  ENDLOOP.

  FORMAT COLOR OFF.
  PERFORM WRITE_DATES_TIMES.

ENDFORM.                    " write_audit_report

AT LINE SELECTION.
  IF IT_IDOC-DOCNUM IS NOT INITIAL.
    CALL FUNCTION 'EDI_DOCUMENT_TREE_DISPLAY'
      EXPORTING
        DOCNUM        = IT_IDOC-DOCNUM
      EXCEPTIONS
        NO_IDOC_FOUND = 1
        OTHERS        = 2.
  ENDIF.

Hope this will give you an idea.

Regards,

Ferry Lianto