Application Development 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: 

Re: T-code FB03

hitesh2
Participant
0 Kudos

Hi,

When you execute t-code FB03 i see item text as

" Spcfy in p.adv: Document number 0090554911 " on each line item. How can i modify this text. Is there any user exit that will help me do this task.

Thanks,

Hitesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Let us try this. In the user exit EXIT_SAPLIEDP_102, you can modify the AVIP data. Move all the AVIP modifications that we did in the previous exit. Just do the text update in that exit. Like this


LOOP AT avip_in_out.
  avip_in_out-sfeld = 'SGTXT'.
  avip_in_out-stype = 'C'.
  avip_in_out-swert = 'This is my test text.'.
ENDLOOP.

33 REPLIES 33

Former Member
0 Kudos

If you want to change the text for a document manually, you can just select the document, press change, select a line item and then select the header. It will let you change the header text.

Or do you want to make the same change to all of the transactions?

Rob

0 Kudos

Rob,

Thanks for your response.

We get payment advice from the customer electronically which we convert it to IDOC file for further processing. This IDOC file we use it for Incoming payment through transaction F-28 selecting this file under payment advice number. After posting this transaction when we display this document following text appears in FB03 for each line of item.

" Spcfy in p.adv: Document number 0090554911 "

I want to change this Item text programmatically.

Thanks,

Hitesh

0 Kudos

Hi Hitesh,

Looks like this is a configuration task. Check entries in table T053. If you find this text in there (0090554911 is a runtime value for some variable in that text), then follow the config path IMG>Financial Accounting>Financial Accounting Global Settings>Document> Line Item--> Define Texts For Line Items.

Hope this helps,

Srinivas

0 Kudos

I'm not sure if this will help, but you can give it a try:

Assuming this is a customer account, go to transaction FBL5N and enter the customer number and other criteria to select the documents you want; press execute and you'll get back a list. Select all or just the ones you want to change. Then:

Environment->Mass change->New values

You'll be presented with a popup where you can enter a new text. Enter the text and press "Execute Changes".

This will change the line item text for all of the items, but it won't be visible until you re-execute the transaction.

Rob

0 Kudos

Srinivas,

Thanks for your response, You clearly understood my issue and i checked the table T053. The said text is not there

" Spcfy in p.adv: Document number 9999999999 "

I think program is pulling this text from somewhere else.

Let me know if you have any further information.

Thanks,

Hitesh

0 Kudos

Hi,

so check further possibilities:

1) substitution - TA: OBBH

2) field exit - report RSMODPRF

3) user exit - for your idoc process (FIPAYM)

regards Andreas

0 Kudos

Can you tell us what is the IDOC and message type for this?

Srinivas

0 Kudos

Srinivas,

Basic type : PEXR2002 ( Payment/payment advice note .. )

Message type : REMADV

Thanks,

Hitesh

0 Kudos

In the include LIEDPF79, there is a user exit call


CALL CUSTOMER-FUNCTION '101'
                    EXPORTING  IDOC_CONTROL_INDEX  = IDOC_CONTRL_INDEX
                               IDOC_DATA_INDEX     = IDOC_DATA_INDEX
                               AVIK_IN             = IDOC_AVIK
                               AVIP_IN             = IDOC_AVIP
                               AVIR_IN             = IDOC_AVIR
                    IMPORTING  I_FIMSG             = USER_MSG
                               AVIK_OUT            = IDOC_AVIK
                               AVIP_OUT            = IDOC_AVIP
                               AVIR_OUT            = IDOC_AVIR
                       TABLES  IDOC_CONTROL        = IDOC_CONTRL
                               IDOC_DATA           = IDOC_DATA
                    EXCEPTIONS OTHERS              = 01.

And then there is another user exit call

CALL CUSTOMER-FUNCTION '102'.

They both change the table IDOC_AVIP which has the item texts. My guess is that you may be using one of the user exits to change the text.

Let me know if that is not the case.

Srinivas

0 Kudos

Srinivas,

I tried to debug Idoc using WE19 in foreground it calls user exit CALL CUSTOMER-FUNCTION '101' and CALL CUSTOMER-FUNCTION '102' but IDOC_AVIP doesn't contain such text.

Even if i display Payment Advice using t-code: FBE3 and go to Line Item data it doesn't have that text.

But when i execute t-code: F-28 with Payment Advice no. and see the Line item data specified text exists.

Thanks,

Hitesh

Message was edited by: Hitesh

0 Kudos

Without debugging, do you see any code in those user exits?

In F-28, where are you entering the Payment Advice no.? After you enter all the fields on the initial screen of F-28(Post Incoming Payments:Header Data), exatly what do you do and when do you see the texts? Do you see them after you save it or before itself?

Also, go to tables AVIK and AVIP and see if you can find the texts there.

One more question, are you seeing this text evertime you run F-28 or is it only happening on some? If it is happenning for some, then is there any pattern in those advises?

Srinivas

Message was edited by: Srinivas Adavi

0 Kudos

Srinivas,

I don't see any code in the user exit FEDI002

Functiion Module EXIT_SAPLIEDP_101

EXIT_SAPLIEDP_102

FYI : User Exit is included in the custom project ZPYMNT

In F-28, I enter the Payment Advice # in the lower portion of the screen where it is mentioned for payment advice #. After posting the incoming payment and when I display document (FB03) the said TEXT is appearing in the last column of the document. I see this text only when I process the incoming payment thru payment advice and not when I do it otherwise.

There are no texts in the tables AVIK and AVIP.

I am seeing this text only when I process the incoming payment thru payment advice generated by IDOC file.

can I have your email id to forward the screen shots.

Thanks a lot

Hitesh

0 Kudos

This message was moderated.

0 Kudos

Hi Hitesh,

Looked at the screen shots. Looks like it is pulling the text from either the tables t053, T053S, REGUP or it may be coming from the substitution rules.

Run transaction OBBH and see if you have any Z substitutions there. If there, then double click on it and that should take you to a screen where you will see some steps in the substitution. If you click on each step, you will see what pre-requisite is being checked and what substitution is being made(if the prerequisite is met) on the right side.

Let me know how it goes.

Regards,

Srinivas

You mentioned that you have a Z project activated with those user exits. Is there any code in any of the user exits 101 and 102?

0 Kudos

Srinivas,

I looked all the entries into tables T053, T053S and REGUP no such entry is found.

I don't find any single entry for substitution when i run t-code OBBH.

There is no code in user exit 101 and 102. I had break point on include when i was debuging in foreground using t-code WE19.

Even if i display the payment advice using t-code: FBE3. I don't see such text on Line item.

Thanks,

Hitesh

0 Kudos

I almost ready to give up. Let us try this last thing. Go to SE16 and enter table name STXL. Give 'TX' for RELID, 'BELEG' for TDOBJECT, 'EN' for TDSPRAS and your payment advise number for TDNAME. See if you get any records. If you get, make a note of the TDID value. Now go to SE37 and test the function module READ_TEXT. Enter the values from above for the function module.

Let me know if that leads you to anything.

Srinivas

0 Kudos

Did you check if there is anything under the 'Rules' in OBBH transaction?

Also check OB28.

0 Kudos

Srinivas,

I took help of OSS, and this what they replied.

1) The source of the text is the posting program itself (f-28/fb05)sapmf05a(include mf04afa0). Search for :bseg-sgtxt(15) = 'Angabe im Avis:'(072).the program puts in the customer account line item field SGTXT:'specfy in pmt advice: Check 079787 pmt advice 001234343 (or some-thing like that.)

2) The BSEG-SGTXT is typically filled with some text from the AVIP-SWERT(selection value). This normally provides cash-application clerks with additional reference data they may use in further clearingof 'partially applied' items.

Thanks,

Hitesh.

0 Kudos

So does this answer your question or you still need help? Please let me know.

I did check(before you asked OSS) the first part of their reply already but didn't find anything useful there. I will check the second one now and will let you know my findings.

Srinivas

0 Kudos

Go to AVIP and see what values you have in the fields SFELD and SWERT.

Srinivas

0 Kudos

Srinivas,

I still need help. Table AVIP-SFELD = BELNR, and AVIP-SWERT = Our invoice number.

That is the number we get at end of specified text.

AVIP-SWERT = 0090554913.

'Spcfy in p. adv: Document number 0090554913'

Thanks,

Hitesh

0 Kudos

Ok. Here we go. This is hardcoded into the program to use BELNR and that text element mentioned in the OSS note. I think you can use a user exit in REMADV_SAVE_DB function module to change the text. Try it out and let me know. The user exit is EXIT_SAPLFRAD_001. You will have the values in the structures AVIK and AVIP format and you can modify the AVIP-SGTXT in return.

To do a quick test, just enable this user exit using CMOD, enhancement RFAVIS01, component EXIT_SAPLFRAD_001, include ZXAVSU01. Create this include and enter the following line in the include.

ID_TEXT = 'This is my test text.'.

Activate the project and create one document and see if this text is there on the item. If there, you have the solution and please close the post. If not, let me know.

Srinivas

0 Kudos

Srinivas,

I already tired this User exit at starting of my assignment.

'This is my test text', will be copied to Payment advice line item in field AVIP-SGTXT (T-code: FBE3).

But when i process payment advice # in F-28 this text is not copied there.

Thanks,

Hitesh

0 Kudos

So you can manipulate the text on the payment advice but when you post the payment with reference to this advice, the line item text is not getting copied. I tried to look into the code of the F-28 transaction to see where the SGTXT is being set. I got lot of places, but still could not figure out which one will be applied under which circumstances. Since I don't have an example in my system to debug, I cannot experiment here.

But here is where the text is being set. In the include MF05AFA0_AUSGLEICH_ZAHLUNGSD09, form AUSGLEICH_ZAHLUNGSDIFF_AV, line 72


*------- Text aufbereiten ----------------------------------------------
    IF LAST_FNAME NE XAVIP-SFELD.
      LAST_FNAME = XAVIP-SFELD.
      PERFORM SCHLUESSELWORT_LESEN2(SAPFS003)
              USING 'AVIP' LAST_FNAME LAST_KEYWO RC.
    ENDIF.
    BSEG-SGTXT(15)    = 'Angabe im Avis:'(072).
    BSEG-SGTXT+16(15) = LAST_KEYWO.
    IF XAVIP-STYPE = 'D'.
      WRITE XAVIP-SDATE TO BSEG-SGTXT+32(18) DDMMYY.
    ELSEIF XAVIP-STYPE = 'B'.
      WRITE XAVIP-SCURR TO BSEG-SGTXT+32(18) CURRENCY BKPF-WAERS.
    ELSE.
      IF XAVIP-SWERT NE SPACE.
        WRITE XAVIP-SWERT TO BSEG-SGTXT+32(18).
      ELSE.
        WRITE '???' TO BSEG-SGTXT+32(18).
      ENDIF.
    ENDIF.
    CONDENSE BSEG-SGTXT.

Based on this, what I can figure out is that you cannot avoid the text 'Spcfy in p.adv:' which occupies about 15 characters. Then you can manipulate the AVIP record(using the previous post's exit) and set the field SFELD to SGTXT and the text itself into SWERT. You will get to choose 18 characters worth text.

Remember, SFELD is configurable field and you can add that by going through the config path


Implementation Guide for R/3 Customizing (IMG)
-->Financial Accounting
   -->Accounts Receivable and Accounts Payable
      -->Business Transactions
         -->Incoming Payments
            -->Manual Incoming Payments
               -->Make Settings for Processing Open Items
                  -->Choose Selection Fields or
                  -->Choose Search Fields

I cannot say it works, but try changing the value of the fields I mentioned in your user exit code and see if it helps. Even then, you will have only 18 characters.

I will see what I can find more.

Srinivas

0 Kudos

Hi Hitesh,

Got your mail. As I told you, it may not be possible to eliminate the 'Spcfy in p.adv.'. All you can probably do is to try the following code in the user exit EXIT_SAPLFRAD_001, include ZXAVSU01.

ID_TEXT = 'This is my test text.'.

CLEAR IS_AVIP-SFELD.

IS_AVIP-STYPE = 'C'.

IS_AVIP-SWERT = 'This is my test text.'.

This may not work, but give it a try. I cannot find any other user exits suitable for this. If it works, your BSEG-SGTXT should look like this

'Spcfy in p.adv. This is my test te' since you have only 18 characters that you can work with.

Let me know how it goes.

Srinivas

0 Kudos

Srinivas,

I tried the following code in the user exit EXIT_SAPLFRAD_001, include ZXAVSU01.

ID_TEXT = 'This is my test text.'.

CLEAR IS_AVIP-SFELD.

IS_AVIP-STYPE = 'C'.

IS_AVIP-SWERT = 'This is my test text.'.

When i try to check/activate include it's giving me error

The field 'IS_AVIP-SFELD' cannot be changed. Same for other two IS_AVIP fields.

I think this is because IS_AVIP is only importing structure.

Thanks,

Hitesh

0 Kudos

Then we don't have any way to manipulate it. What text do you want to pass to this anyway?

Srinivas

0 Kudos

Srinivas,

Three fields from Payment advice Check #, Customer Ref. # and Document #. Document # is already printing in specified text.

Thanks,

Hitesh

Former Member
0 Kudos

Let us try this. In the user exit EXIT_SAPLIEDP_102, you can modify the AVIP data. Move all the AVIP modifications that we did in the previous exit. Just do the text update in that exit. Like this


LOOP AT avip_in_out.
  avip_in_out-sfeld = 'SGTXT'.
  avip_in_out-stype = 'C'.
  avip_in_out-swert = 'This is my test text.'.
ENDLOOP.

0 Kudos

Srinivas,

Congratulations, I am so happy...

Thanks, Thanks a lot.

Thanks,

Hitesh Thakore

0 Kudos

Good news. Wow! finally, it did work. So how does your item text look like on the document now?

Regards,

Srinivas

0 Kudos

Srinivas,

Item text looks like

'Spcfy in p.adv: Text This is my test te ' on the document.

LOOP AT avip_in_out.

avip_in_out-sfeld = 'SGTXT'.

avip_in_out-stype = 'C'.

avip_in_out-swert = 'This is my test text.'.

--> MODIFY AVIP_IN_OUT. ( Added )

ENDLOOP.

Thanks,

Hitesh Thakore.

0 Kudos

Just like we expected.

Yes, I forgot to put that MODIFY statement. Glad to see it working.

I will definitely get a good night sleep, now that this is resolved.

Srinivas