Skip to Content
Technical Articles
Author's profile photo Shyam Agrawal

Allowing multiple entries for document number in F-28 | F-32

Hey everyone,

So here I am with another blog which talks about an enhancement which can help in solving a problem that has been there in F-28, F-32 and other similar standard transactions since long time.

People worked in FI as a consultant or end users know that while using F-28, we cannot give as many document numbers as we want as input. There is a limitation on number of documents that can be supplied at one go with below flexibility:

  1. Document range can be supplied(in some transactions only)
  2. Once 15 document numbers are entered and pressed ‘Enter’ on keyboard, all those document numbers are captured internally and fields to provide document number is cleaned so that more document numbers can be entered.

 

Let’s understand in more detail with help of screenshots for TCode F-28:

i) Execute F-28 with relevant information and press Enter

ii) Select ‘Document Number’ in pop-up

iii) We will get below screen where we can enter Document numbers which is restricted (to 13 for F-28)

 

*(Below part – point iv has appeared as part of Enhancement – showing here so that it is well connected with previous 3 steps)

iv) Do not enter any document and press ‘Process Open Items’ to get pop-up to select a desktop file having document numbers.

 

Using this File upload feature, users can pass any number of documents(when I say any, it is not restricted to a number in general, but users should also take care of not passing thousands of record to avoid performance issue).

 

Though, standard SAP transaction provides flexibilty via above 2 points, I still see it as a gap for not being able to key-in as many documents as we want.

Point-1 above fails partially when we want to choose few docments from a range and hence cannot really use the range.

Point-2 fails when users really want to enter huge number of documents and can only supply in multiples of number of allowed entries.

 

Below is the Source Code snippet for point-iii screen.

 

Technical Design

Here are the technical details of this solution via use of a Implicit Enhancement:

A) Flexibility Point-2 mentioned above works on concept that with every enter, document numbers/range is captured in an internal table and screen is made clear for more documents. So, basically this step is for collecting all the documents that user wants to clear.

B) A careful look at PAI window gives impression that MODULE SEL_WERTE takes document number and processes it temporarily for each document number enetered on screen.

C) On further exploring highlighted MODULE PAI_ANFANG,  I noticed that it can be enhanced to upload a file with Document Number and run all those entries through MODULE SEL_WERTE to have standard code/process/validations run for these entries which were added via file upload.

D) With help of an Implicit enhancement in MODULE PAI_PAI_ANFANG (which is inside MODULE PAI_ANFANG), I got all the possible document numbers via FIle Upload and mapped to FROM and TO values.

E) After mapping these values for each entry, Sub-routine PAI_SEL_WERTE was called to apply all standard validations.

This way, we were able to allow entering 100s of documents or even more in one execution and saved a lot of time for end users.

 

Few additional points:

  1. This will work for other selection criteria also(Reference, Payment Order – as depicted in screenshot ii).
  2. If needed, a screen button can be added so that Upload functionality will work only on click of that button. Otherwise, this code will be executed on press of ‘Enter’ or click of button ‘Proces Open Items’. This can be further controlled based on specific need.
  3. This functionality will work for other similar transacations as well wherever MODULE PAI_ANFANG is used, so put a Screen# or TCode check if you wish to enable this only for a specific transaction

 

Please let me know via comments below if this helped you save some time for end users / customers.

Any reviews / suggestions are always welcome.

Happy learning!

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michelle Crapo
      Michelle Crapo

      I could see where this might be something they used.  I'll pass this on and see if anyone in FI would like it.  It seems like a fairly painless addition.   And it could generate some goodwill.  You have to love that.

      Nicely done.

      Author's profile photo Shyam Agrawal
      Shyam Agrawal
      Blog Post Author

      Thanks Michelle. I am sure it will be helpful to many Organisations. Hope to see feedback from people who will be implementing / using this 🙂

      Author's profile photo Amit Sen
      Amit Sen

      Hello I face same problem when creating a BDC for F-32 unable to upload more than 12 document numbers. But if we pass low & high value of the document number then it will pick all the probable document numbers between this or all the document numbers which I have in the list?

       

      Author's profile photo Shyam Agrawal
      Shyam Agrawal
      Blog Post Author

      Hi Amit,

      With standard solution it will pick all entries between the range.

      You can evaluate the enhancement explained in this blog and then you can upload list of documents which you want to pass.

      Author's profile photo Prasad Joshi
      Prasad Joshi

      How can we enhance MODULE PAI_ANFANG? There is no any routine inside this Module.

      Author's profile photo Shyam Agrawal
      Shyam Agrawal
      Blog Post Author

      Hi Prasad,

      Please refer point (D) as mentioned in blog.

      D) With help of an Implicit enhancement in MODULE PAI_PAI_ANFANG (which is inside MODULE PAI_ANFANG), I got all the possible document numbers via FIle Upload and mapped to FROM and TO values.

       

      If in your current SAP version, there is nothing inside MODULE PAI_ANFANG, then you need to look for alternate place. May I know which version you are working.

      Author's profile photo Arpitha Shet
      Arpitha Shet

      Hi Shyam Agrawal ,

       

      It is the same issue with me, i am not finding MODULE PAI_PAI_ANFANG inside MODULE PAI_ANFANG. Infact its blank inside MODULE PAI_ANFANG. Can i know where have you written logic for  file upload ? is it in MODULE PAI_ANFANG?

      Thank you,

      Arpitha

      Author's profile photo Shyam Agrawal
      Shyam Agrawal
      Blog Post Author

      Hey Arpitha,

      You can refer below image.

      If in your case, PAI_ANFANG is BLANK, then you need to look for an alternate place, if some other sub-routine are there. May I know which version you are working. Also, if possible, please share the image.

       

      Author's profile photo Arpitha Shet
      Arpitha Shet

      Hi Hi Shyam Agrawal

      We are using this EHP5 FOR ERP 6.0 and i checked Include MF05AI10_PAI_ANFANG it does not have Form PAI_PAI_ANFANG. Did you write the file upload in Form PAI_PAI_ANFANG?

      Author's profile photo Shyam Agrawal
      Shyam Agrawal
      Blog Post Author

      Yes, it was inside Form PAI_PAI_ANFANG.

      Author's profile photo CA Zunaid Hingora
      CA Zunaid Hingora

      Hi,

      Can we use this for FB1S? User is clearing 1500 documents by entering 15 at one time and now he wants to clear in one shot. He wants to upload at once or want some programme to do this. Can you please guide?

      Regards

      Zunaid