5 1 1 1 1 1 Rating 100% (3 Votes)

If during creation of purchase requisition you've attached some documents into requisition and you convert requisition to purchase order then the attachments aren't copy to PO. But you can do it either by daily job or by the implementation of user-exit if you know how to link GOS object to PO. I faced a request to copy attachments from PR to PO, but what I did was in fact just linking existing attachment to PO. In that way you do not double the same content on server. Bellow you can find the code of an function module which uses 'BINARY_RELATION_CREATE' and 'BINARY_RELATION_CREATE_COMMIT'.

  • Importing

I_EBELN TYPE EBELN -> Purchase Order number
I_COMMIT TYPE C     -> Do you want to do the commit?

  • Tables

T_EBAN STRUCTURE EBAN  -> Table with PR lines to check GOS relations

  • Exceptions

BINARY_RELATION_CREATE_ERROR

Add a comment
Read more ...

5 1 1 1 1 1 Rating 100% (1 Vote)

At the very begining when I started to develop in ABAP I was wondering why I cannot clear all global data at once after I do all my calculations? As this is something that it's very useful when you create a report which just show some figures and you don't need anymore all the internal tables or objects that you used to prepare output table. So to free memory then just before calling ALV I was always refreshing all tables and clearing work areas, but this was something that had to be done manually so I was a little bit angry that I cannot automize it... and then I started to look for the way how to automize it.

I knew that SE80 is displaying all globals but I couldn't find how it's done there. As you may know debuggin the code which was done by SAP is creepy usually and after spending some hours on that I gave up. But it returned someday I just simply saw FM 'RS_PROGRAM_INDEX' and that was enough to create fast a method to free all global data for me. 

So let's start with definition. We will need a range type which we will use to call the method with objects to be excluded from clearing (like ALV output table or ALV objects)

Add a comment
Read more ...
Page 5 of 5

ABAP Favorites Eclipse plugin

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client