cancel
Showing results for 
Search instead for 
Did you mean: 

Text in display mode, in VF02

former_member182378
Active Contributor
0 Kudos

Members,

When billing document is created, the Header text is populated automatically because of some enhancement.

In VF02, in standard SAP, this text is editable.

How to make Header text non-editable (only display) in VF02?

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor
0 Kudos

In general, it's not a good idea to use the texts to store information of such importance that it must not be modified. Perhaps this information should be moved to some place else where it could be managed better. This depends on what it actually is and how much space is needed.

former_member182378
Active Contributor
0 Kudos

Jelena,

Yes, that was our first idea too!

But in the billing document we do not have Tabs Additional Data B / A, also using an existing field will have a risk if at a later stage business wants to use this field. Looking into these reasons, we decided to use Header Text.

Please give your comments.

moazzam_ali
Active Contributor
0 Kudos

Hi TW

We don't have additional tab but we can create one easily. We can add field in VBAK or VBAP by using append structure. There is a document which I also shared in one of my documents that how to add a tab and field in Billing header and save it in VBAK table. You can create a text field and save your information there if possible or you could also use attachments which gets save in standard tables and you can control that with authorization object. I shared a document on that too

Thank$

former_member182378
Active Contributor
0 Kudos

Hi Moazzam,

Thanks! I will search for that document.

In your post you mention VBAK, do you mean VBRK?

TW

moazzam_ali
Active Contributor
0 Kudos

Hi

Yes! I meant VBRK and VBRP. Thank you for correcting me.

Thank$

former_member182378
Active Contributor
0 Kudos

Moazzam,

Could you paste the link for the document you had created?


you could also use attachments which gets save in standard tables and you can control that with authorization object. I shared a document on that too

can you share this document also?

Below 2 links suggest that it is not possible to add custom fields in VF01/2

Others

Add New Customized Fields in Billing Document - Toolbox for IT Groups

moazzam_ali
Active Contributor
0 Kudos

Hi TW

Check this below document. In this I have shared the lin which tells how to add field in VF01/VF02. It is possible and I have done this.

And following is the other one which you can use to restrict users from deleting or changing attachments once made.

Thank$

former_member183155
Active Contributor
0 Kudos

Hi all ;

In MM module , we can control this like a -->

But , it is not possible in standart configuration in SD. I quess that you have to need a abaper to control this text. Please check with RV45AFZ1 userexit.

However , sap permiss changing of only texts in out of XX03 tcodes.

Regards.

M.Ozgur Unal

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

could you please have a check on the setting for 'reference' checkbox of the text ID in the text determination procedure?  to my understanding, if the text is a reference one, it will not be editable by nature...

former_member182378
Active Contributor
0 Kudos

Cong,

Thanks for your post! I will check and update here.

I did not think of activating reference, as the text in billing document is coming from an enhancement and not from previous documents.

TW

former_member182378
Active Contributor
0 Kudos

Cong,

I have tested, this does not give a solution!

Even if reference field is activated for this text id, in the text procedure; in transaction VF02, this text id is editable (along with all other ids).

TW

kabil_g
Active Participant
0 Kudos

This message was moderated.

former_member223981
Active Contributor
0 Kudos

When you call the "Header Texts" menu, the following code will be executed:

SAPMV60A / FORM INIT_TEXTE

***********************************************

* fields active <> inactive
  IF t185f-trtyp CA 'AC' OR tvcom-txtgn IS INITIAL.
    display_flag = 'X'.
  ENDIF.

  CALL FUNCTION 'SD_WORD_PROCESSING_PUT'
       EXPORTING
           fi_application_data  = tvcom
           fi_display_flag      = display_flag
           fi_display_language  = '*'

            FI_GROUP             = TVCOM-TXTGN

*          FI_NEW_TEXT_LANGUAGE = SY-LANGU

            FI_OBJECT            = TVCOM-TDOBJECT

*          FI_RESET_FLAG        = ' '

*          FI_APPL_OBJECT_IDENT = ' '

*          FI_APPL_OBJECT_DESCR = ' '

            fi_default_fcode     = 'ENT1'

            fi_subscreen_number  = subscreen_kfte

*          FIT_EXCL_FCODE       =

            fit_xvbpa            = xvbpa[]

  CHANGING

      fct_xthead           = xthead[]

      fct_xvbuv            = xvbuv[]

  EXCEPTIONS

       error_occured        = 1

       OTHERS               = 2

***********************************************

The above code states: if transaction type is A (Display) or C (read from archive), then we set data object display_flag to X. When data object display_flag is set to "X", it means that the text cannot be edited (you can test this by changing the data object manually in the debugger).

For your requirement, you need to set the display_flag to "X" when you are in VF02. Currently the standard behaviour that we see above seems logical to me. After all, you are in VF02, so it makes sense that this  you can edit texts here.

I checked for a possibility of changing the value of display_flag in a user exit but it seems there is none located where you need it. Therefore, maybe it would be an option for you modify the above code so that it says

* fields active <> inactive

  IF t185f-trtyp CA 'AC' OR tvcom-txtgn IS INITIAL OR SY-TCODE = 'VF02'.

    display_flag = 'X'.

  ENDIF.

or something along those lines.

       .

former_member182378
Active Contributor
0 Kudos

Noel,

Thanks for your post!

I will discuss this with my ABAPer.

Further, for this requirement, I create a new text ID. Only the content of this text ID should be always in display mode. At code level, can we specify that the logic should work only for this text ID, in VF02?

TW

former_member223981
Active Contributor
0 Kudos

It would not be a straightforward modification to do that. You want to say "If TEXT ID contains text then set the display flag". Unfortunately, checking if the text id used contains text is not that easy! You state in your initial message: "the Header text is populated automatically because of some enhancement."
A possible approach would be to set a z field in this enhancement. So when the text id is filled, you also set the z field to "X". Then modify the above code to say:

* fields active <> inactive

  IF t185f-trtyp CA 'AC' OR tvcom-txtgn IS INITIAL OR [your Z Field] is NOT INITIAL.

    display_flag = 'X'.

  ENDIF.

But this is a modification and should be a last resort. If there is a possibility to use an additional tab for the text (as suggested by other members below), then you should go with that.

former_member182378
Active Contributor
0 Kudos

Thanks Noel!

moazzam_ali
Active Contributor
0 Kudos

Hi TW

This is standard behavior that we can change texts even before or after posting the invoice to FI. I don't think so there is some control in standard IMG settings for this. You probably need to go for some userexit. I found following link when I searched for userexits for texts in VF02. Please check this and update.

http://scn.sap.com/thread/3461630

Thank$

former_member182378
Active Contributor
0 Kudos

MoazzaM,

I did not find any helpful posts from the suggested thread.

TW

moazzam_ali
Active Contributor
0 Kudos

Hi

Did you try those userexits? If these are not working then you could ask your ABAPer to find some. There must be some userexit or enhancement point which can trigger this thing.

Thank$

Lakshmipathi
Active Contributor
0 Kudos
Header text is populated automatically because of some enhancement

I don't think so.  System, with standard configuration, will populate header text automatically.  In your case, if it is not happening, then in that case, some exit should be in place.  Check your system.

How to make Header text non-editable (only display) in VF02?

Do you mean to say, currently, it is not editable?  You should be aware, if an accounting document has been generated, in that case only, the header text in billing document would NOT be in editable mode.   How about in your case?

G. Lakshmipathi

former_member182378
Active Contributor
0 Kudos

Lakshmipathi G,

My question is - How to make text in display mode, in t-code VF02?

Currently when user goes to VF02 (accounting document created or not created), Header text is editable. He can change this text (and save the billing document).

How to make it in display mode, so that change of text is not possible in VF02.

Message was edited by: TW Typewriter

Lakshmipathi
Active Contributor
0 Kudos

As per note 436488, if an accounting document is generated, you cannot make any changes to header text in billing document.  To overcome from this, you need to carry out coding corrections as recommended in the above note

G. Lakshmipathi

former_member182378
Active Contributor
0 Kudos

The header text in billing document is editable even after an accounting document is created.

This was commented by , also I have tested and confirmed.

Just FYI

TW

Lakshmipathi
Active Contributor
0 Kudos

TW Typewriter

' MoazzaM '


As per note 436488, the billing document header text cannot be changed once an accounting document is released and may be I felt, in both your cases, the correction program as recommended in the above note would have made.  Alternatively, Correction P99K057774 would have been included if your system is as of Release 4.6B.  If you want to prevent the users not to edit the header text, then, you have to comment the coding.

G. Lakshmipathi