Skip to Content
Author's profile photo Former Member

Selective document setup for LO Datasources

Running Selective Document Setup for LO Datasources

Well,I was looking for a solution where I had to run repair full request and I had a large no. of

Purchasing documents for setup ,which were not in range but rather individual ones.

ie.4500000748,4500000751,4500000754,4500000759,4500000763 etc.


Here,if you have just few documents for doing setup then its okay ,but if the no. is very large say

thousands  ,then probably you would go mad doing it again and again individually.


The standard transaction OLI3BW doesn’t allow you to do it ,as you can only enter single document

or document range.Which is infact okay ,for standard setup scenarios.So to achieve it for individual

documents,you need a work around.


Step by Step soulution:

1.Create and ABAP report based on the Report run by Transaction OLI3BW.

The transaction OLI3BW runs report RMCENEUA.The OLI3BW screen looks like below




Pic 1.


But when you run the Report RMCENEUA directly through SE38 then it looks something like Pic 2.

This program is hardcoded for transaction code to contain BW.

Sy-tcode+4(2) = ‘BW’.If this condition is fulfilled ,then only you get the screen of OLI3BW otherwise

you will only get this default screen shown below.Which means you should run this

Report only with a transaction of 6 character length and having ‘BW’ at the end.



Pic 2.


Now the Program will be like this :









TABLES : ekko.


DATA BELNR_L LIKE ekko-ebeln.


DATA: laufname LIKE rmcsneua-laufname ,

            neulauf  LIKE rmcsneua-neulauf,

            enddat   LIKE rmcsneua-datum ,

            endzeit  LIKE rmcsneua-uhrzeit .


PARAMETERS: runname LIKE rmcsneua-laufname OBLIGATORY,

          newrun  LIKE rmcsneua-neulauf,

          enddate  LIKE rmcsneua-datum DEFAULT sy-datum OBLIGATORY,

          endtime  LIKE rmcsneua-uhrzeit DEFAULT sy-uzeit OBLIGATORY.






SUBMIT rmceneua with BELNR_L = wa-low

                with laufname = runname

                with enddat = enddate

                with ednzeit = endtime

                with neulauf = newrun

                AND RETURN.






Pic 3.Create new transaction in SE93 based on ZREPORT: ZBWP_INIT_PO_DOC_SELECTION_01 .

What is being done is,we are running the OLI3BW transaction in loop for individual documents.


2.Now since your program is created and You have created transaction in SE93 so you can go ahead

and do setup for selective documents.



Pic 4.


Fist create a .csv file contain list of all document numbers you need in selection.Now Run the

Transaction ZOL3BW(your custom transaction)click on selection  button which is  beside the

doc_num box.

Import the document numbers from .csv file (its good when you have large no. of

documents.)Once the documents get selected ,click on execute button and you are done.

Here ,onething needs to be clarified,this thing will only work in dialog mode (and that you can say

is demerit .)The same concept  can utilized for doing selective setup in case of OLIZBW where

you have to select the company code again and again.May be you can explore it using the

above concept and give me your feedback.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hi Rakesh,

      Just i am seeing the program RMCENEUA, but i am not able to see sy-tcode+4(2) = 'BW'.
      Whether i am looking at right place?