cancel
Showing results for 
Search instead for 
Did you mean: 

Substitution for BSEG-SGTXT while doing F110

Former Member
0 Kudos

Hello all,

Our requirement

while doing payments for RTGS/NEFT through F110, BSEG-SGTXT should be filled with vendor name.

Solution found

I tried this by substitution at acll up point 2 in OBBH by using User Exit. In user Exit we have written coading as Take BSEG-LIFNR where Account Type = K, go to LFA1 where BSEG-LIFNR=LFA1-LIFNR, Pick NAME1 for that LIFNR, & print that NAME1 in BSEG-SGTXT.

Problem Area

Now problem is, substitution is trigring but it is substituting BSEG-SGTXT by LFA1-NAME1 only for 1st line where account type = K (i.e Vendor Line item). System is not printing same NAME1 to the corresponding line item (i.e Bank Line item).

We want NAME1 at Bank Line. I have tried for Substitution at call up point 3 i.e Complete Document level but system is not allowing for the same. In SAP notes I found that substitution at this call up point not possible. Another thing is F110 runs at background, due to which we are not able to set any breakpoints & not able to do debuging also.

We tried all possible way outs. We tried BTE also but still problem is same. Could any one plese help me out. I am trying my best but not able to get any solution. This very much needed.

Thanks & regards,

Mayur Kulkarni.

Accepted Solutions (1)

Accepted Solutions (1)

ajaycwa1981
Active Contributor
0 Kudos

Hi

The problem is your ABAP code... The way you have written it, you have restricted it to trigger only for Account Type = K

In my opinion, Create a Subst Entry in OBBH for T code F110.... i.e. Prerequisite in OBBH will be T CODE = F110

Field to be Substituted = BSEG-SGTXT

Method to be used = Exit...

Now code your exit in such a way that it reads the vendor line item and updates the vendor name in BSEG-SGTXT of all line items...

You need to use the command LOOP in your ABAP code so that the code works for all line items

br, Ajay M

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

Can I know the user exit name, which you have used as I have the same requirement.

Regards,

Sagar

Former Member
0 Kudos

Problem resolved as I found the solution by myself

former_member293658
Participant
0 Kudos

Hi Mayur,

We have the exact same requirement as you had here and I am wondering if you please advise how you coded the user exit so that all line items of BSEG associated with the paymnet documnet were updated with the vendor name?

We have done the same steps:

- created entry in OBBH for company code 0001

- use callup point of 2 (line item)

- called based on BKPF-TCODE = F110

- in the user exit we can use this basic code to move the vendor name to the first line item (the vendor posting line)

select name1 into v_name from lfa1

where lifnr = bseg-lifnr.

move v_name to bseg-zuonr.

endselect.

But we cannot get the code to post vendor name to the remaining lines in BSEG. We have tried this code but it does not move the vendor name.

select name1 into v_name from lfa1

where lifnr = bseg-lifnr.

endselect.

MOVE-CORRESPONDING BSEG TO IT_BSEG.

LOOP AT IT_BSEG.

move v_name TO IT_BSEG-ZUONR.

MOVE-CORRESPONDING IT_BSEG TO BSEG.

ENDLOOP.

Can you share please the code you used to populate all line items with the vendor name?

Thanks and regards

Mik

Former Member
0 Kudos

Hello Mayur,

Can I get your sample code to see the ?

Regards,

Sagar

Former Member
0 Kudos

Hi All,

Thanks for all your replies. I have resolved this problem by myself. Basicaly problem was, in pre-requisit, I have given Sy-Tcode = F110 & Payment methods = C/Y/T etc. But basicaly problem found was system updateds T-code in BKPF, so it doesn't understand sy-tcode. & another thing is Payment methods are being updated only in 1st line item not in second line item. so when we are saying that payment method= c/T/y system recognizes only 1st line not 2nd. So in coadiing do not specify Payment method

The correct pre-requisit shoud be ,

BKPF-T-code = F110,

Substitute BSEG-SGTXT by User exit,

& main caution is after all this while transporting first transport ABAP transport request for created User Exit & then transport Substitution created request.

Thanks & regards,

Mayur Kulkarni

former_member207607
Active Contributor
0 Kudos

Dear Mayur,

There are several Business Transaction Events (Open FI) available for

the automatic payment program (F110)

- 00001120 DOCUMENT POSTING: Field substitution header/items

- 00001130 POST DOCUMENT: SAP-internal field substitution

- 00001810 PAYMENT PROGRAM: Individual bank determination

- 00001025 POST DOCUMENT: Final checks completed

- 00001030 POST DOCUMENT: Posting of standard data

How about to use them?

I hope this helps.

Mauri

Former Member
0 Kudos

Hi,

We have tried several BTE's but the problem is for F110, breakpoint doesnt work as F110 is runing in background. Due to this we are not able to check the results. For F110 we dont know how to debug & even results are also not coming as desired.

Regards,

Mayur

Former Member
0 Kudos

Hi,

Try with /h on command bar for Debug if break point cant be made.

Regards,

Pramitha.

Former Member
0 Kudos

Hi Ajay,

Thanks for your reply but could you please throw some light on COMMAND loop. So that i can expalain the same to my ABAPER.

ajaycwa1981
Active Contributor
0 Kudos

Hi

I dont know the technical details of LOOP AT...

The Sample command is LOOP AT IT_BSEG INTO WA_BSEG (WA means work area)

What it does is that it repeats the process till all the line items are processed... I guess your ABAPer would have knowledge about it...

Use MODIFY Command for BSEG-SGTXT using LFA1-NAME1...

br, Ajay M

Former Member
0 Kudos

Hi

I ahve tried by your way, but still it is not working. Actualy according to me substitution is trigring for the 1st line item it is checking the conditions, it is substituting BSEG-SGTXT & after that it is storing the document without going to the 2nd line.

Kindly help me.

Regards,

Mayur

Former Member
0 Kudos

Hi Mayur,

Instead of trying user exit in F110, you can try another way i.e. create your own document type for F110 transaction and assign the new document type in automatic payment process.

At document type level, if you write substitution rule for filling BSEG-SGTXT field with Vendor Name from LFA1 table may work. Try and let us know if it works / further inputs.

Thanks & Regards

Sarma Bhamidipatu

Former Member
0 Kudos

Hi,

I checked, But ZP is the document type created while posting F110 entries. In substitution step I have restricted on document type also. My substitution is trigering at right place but problem is it is substituting only one line & requirement is it should substitute another lines also.

Regards,

Mayur