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

F-32 : Clearing Open Items

0 Likes
9,922

Hi,

There's a Z report which displays all open line items for a customer and company code. Records selected from the list are cleared using transaction F-32.

The problem is, more than one document exist with the same document no. but in different fiscal years.

Say, from the list, Doc X is selected for the year 2005, and Doc X exists in years 2003 and 2004 as well,Then all the 3 documents with this doc.no are selected in F-32.

As it is, F-32 can select only based on doc.no as there is no filter based on the Fiscal year.

I want to know if there's a method to clear customer open items based on both Doc.No and Fiscal year.

Thanks in Advance!

-Arthi.

1 ACCEPTED SOLUTION
Read only

0 Likes
5,316

Hi,

Thanks for your reply. But I'm a bit unclear reg the code.

I see that in Screen 733 of this MP pgm, there is a step loop for the field and its value range.

And I'm not able to find this screen being called in the standard recording..where should i put the code that you've mentioned?

Also, what does subroutine bdc_field_loop do? what's the code? I see that you are passing the key structure to it.

I guess it's adding the fields in the structure to the step loop, but will it form a composite key? or a dis-joint one?

Pls clarify.

Thanks,

Arthi.

Hi,

There's a Z report which displays all open line items for a customer and company code. Records selected from the list are cleared using transaction F-32.

The problem is, more than one document exist with the same document no. but in different fiscal years.

Say, from the list, Doc X is selected for the year 2005, and Doc X exists in years 2003 and 2004 as well,Then all the 3 documents with this doc.no are selected in F-32.

As it is, F-32 can select only based on doc.no as there is no filter based on the Fiscal year.

I want to know if there's a method to clear customer open items based on both Doc.No and Fiscal year.

Thanks in Advance!

-Arthi.

11 REPLIES 11
Read only

Former Member
0 Likes
5,316

Hi Arthi,

There is a 'ADDITIONAL SELECTIONS' block in the screen. Just check the option <b>'Posting Date'</b> and enter the account number, this would lead to a next screen where you can give the posting dates that you are looking for(the specific fisal year).

Hope this helps.

Cheers,

Naveen.

Read only

andreas_mann3
Active Contributor
0 Likes
5,316

Hi ,

you can use a concatenated key of bukrs belnr gjahr:

DATA: BEGIN OF bkey OCCURS   0,
        belnr LIKE bseg-belnr,
        gjahr LIKE bseg-gjahr,
        buzei LIKE bseg-buzei,
      END OF bkey.
      ...         
      PERFORM bdc_field USING 'BDC_OKCODE'     'SLB'.        
   
      PERFORM bdc_dynpro USING 'SAPMF05A' '0733'.                 
                                      
      LOOP AT itab WHERE xfeld = 'X'  .         
         CLEAR bkey.                                                                                
cnt = cnt + 1.                                                        
         UNPACK cnt TO zeile.                                                  
         PERFORM bdc_field_loop USING zeile 'RF05A-FELDN' 'BELNR'.             
         MOVE-CORRESPONDING itab TO bkey.                                       
         PERFORM bdc_field_loop USING zeile 'RF05A-SEL01'  bkey.                                                                                
ENDLOOP.    

regards Andreas

Read only

0 Likes
5,317

Hi,

Thanks for your reply. But I'm a bit unclear reg the code.

I see that in Screen 733 of this MP pgm, there is a step loop for the field and its value range.

And I'm not able to find this screen being called in the standard recording..where should i put the code that you've mentioned?

Also, what does subroutine bdc_field_loop do? what's the code? I see that you are passing the key structure to it.

I guess it's adding the fields in the structure to the step loop, but will it form a composite key? or a dis-joint one?

Pls clarify.

Thanks,

Arthi.

Read only

0 Likes
5,316

Hi,

the fcode is 'SLB'

- try it in ok-code box

(i think there's no menue point in the transaction)

Andreas

pls reward points , if answers are useful.

thank you.

Read only

0 Likes
5,316

Thanks!

I'm able to go to that screen now.

But please let me know how this BDC_FIELD_LOOP works..

Is this the code?

FORM BDC_FIELD_LOOP USING P_ZEILE P_FNAM P_FVAL.

DATA: L_FNAM LIKE BDCDATA-FNAM.

CONCATENATE P_FNAM '(' P_ZEILE ')' INTO L_FNAM.

PERFORM BDC_FIELD USING L_FNAM P_FVAL.

ENDFORM.

But how does it process all the fields in bkey.

Right now it passes the value for only the document no.

Pls clarify.

Thanks,

Arthi

Read only

0 Likes
5,316

Hi,

1) code is correct (exactly)

2)it's the same procedure as in rfbibl00 using ta fb05:

read docu:

...
Post with clearing (FB05)
You can also use a BSELP structure to select a specific 
line item in the form <document no.><fiscal year><line 

item no.>. The document number must have 10 characters and the line item 3, 
and the preceding zeros should also 
be entered.


Example: Selecting the third line of document 0000222222
from fiscal year 1997.


BSELP-FELDN_1 = "BELNR"
BSELP-SLVON_1 = "00002222221997003"
...

Andreas

Read only

0 Likes
5,316

Can't find Transaction code SLB.

Read only

Former Member
0 Likes
5,316

Hi,

Please try following FM

BAPI_AR_ACC_GETOPENITEMS.

Regards

Amole

Please reward points If information is useful

Read only

0 Likes
5,316

Thanks a Lot Man(n)!

I'm able to select the documents based on the specified key.

Thanks Again!

-Arthi.

Read only

Former Member
0 Likes
5,316

Hello,

I have the same problem in our 4.7 system that in F-32, previous year open items with the same doc.number were selected when selected by document number. Unfortunately the special concatenated 'key' of <doc.no><FY><line item> mentioned by Mann does not work for our system. On screen 733 of SAPMF05A, it requires the BELNR value to be just the document number.

RF05A-FELDN = 'BELNR'.

RF05A-SEL01 = '0000222222'.

I tried to use the OR <> AND pushbutton on the menu to try to enter both BELNR and GJAHR in the selection fields (RF05A-FELDN) but it will only consider the last field, (e.g. if BELNR then GJAHR are entered and selection sequence are switched to "AND", all open items in the GJAHR value will be selected, instead of just a specific document with number of BELNR value.

Beside the special hidden OK CODE of "SLB", does anybody know any other way to select open items with both Document number/reference document number <b>AND</b> Fiscal year when process in F-32?

Any advice is greatly appreciated. Thank you so much.

Read only

Former Member
0 Likes
5,316

hi Arthi,

You said that u have a Zreport which displays all open line items for mulitple customers and company codeand clear. Records selected from the list are cleared using transaction F-32.

Can u please help me to provide the Zprogram which u have, so that it will be using for me.

My client want automatic customer clearing for RTGS related items

Process flow for RTGS in india is as follows,

So now my client need a customized program for automate the clearing open items, (Last block which is marked need to be automated).

Like as F-32 is used to clear open items for individual customers, my client needs a program to be for multiple customers, before clearing the open items they need a overview for all the customers and they need the program which will clear items which are related to only RTGS payments but not Cheques, that is main actually.

Thanks In Advance,

Nitin Kumar

8095885285