cancel
Showing results for 
Search instead for 
Did you mean: 

How to select range for dater in BAPI_DOCUMENT_GETLIST2

Former Member
0 Kudos

Hi All

I have following problem with this FM BAPI_DOCUMENT_GETLIST2. I was looking a lot on different forums but I cannot find answer which corresponds to my problem.

I have in DMS saved files for our customer and Iu2019m using object linking as

Objlinkselection-DOKOB = KNA1

Objlinkselection- OBJKY = KUNNR.

It works well, but it takes all doc from beginning. Iu2019d like to make selection that final table documentdata is in range of defined range date with values 20111201 to 20111231

Now I have to select all documents for this customer and after that I have to make loop to get correct files. And it takes a huge time and in a few years it will collaps


LOOP AT LT_DOCUMENTDATA INTO <FS> WHERE CREATEDATE IN  rn_DATE.
...

ENDLOOP.

Any hint how to make this faster?

Just to avoid any misunderstandings, I'm not asking on loop speed but how to select by FM less rows based on create date.

Thank a lot fo any hint

Petr

Accepted Solutions (1)

Accepted Solutions (1)

former_member188883
Active Contributor
0 Kudos

Hi Petr,

Please find some useful information on your requirement in the link below.

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos

Hello Deepak,

Thanks a lot for your answer. I have read this thread already, but it is not realy what I need. But anyway in the night I have found solution.

I will go through table DRAW where I will get just DOCNUMS for current date range.

Than I will select correct rows from table DRAD for selected KUNNR.

Final set od DOCNUMS I will use as selection criteria for BAPI.

It should help, now I go to try it.

Thansk anyway

Petr

Answers (0)