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

PR header text is getting copied automatically

former_member212705
Active Participant
0 Likes
4,072

Hello Experts,

We are facing very strange situation. As soon as user exeutes tcode ME51N in production without inputting any data, header note from other PR gets copied and populates automatically in header note. This is not happening in quality and development. i checked configuration but could not get success. No code has been moved to Production. So how can it be possible.

Any input will help me. I already checked threads but no luck till now .

Regards,

Ashish T.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,929

You could check for a BAdI as ME_PROCESS_REQ_CUST methods INITIALIZE and OPEN or ME_REQ_HEADER_TEXT method COPY_HEADER_TEXT may be some code executed that find data in production but not in development or quality (some "wild" text records with partial initial key?)

Edit : After a fast search on OSS, I found a recent note for ME21N with same symptoms 2095429 - Text filled with data for no reason in transaction ME21N (Create Purchase Order) which seems to confirm my analysis, but does nor require error in BAdI implementation .

Regards,

Raymond

Hello Experts,

We are facing very strange situation. As soon as user exeutes tcode ME51N in production without inputting any data, header note from other PR gets copied and populates automatically in header note. This is not happening in quality and development. i checked configuration but could not get success. No code has been moved to Production. So how can it be possible.

Any input will help me. I already checked threads but no luck till now .

Regards,

Ashish T.

13 REPLIES 13
Read only

Former Member
0 Likes
2,929

Hi Ashish,

Check whether any Transaction Variant is maintained for ME51N in production.

Let me know whether this is the issue or not.

Thanks and Regards,

S.Rajendranath

Read only

0 Likes
2,929

thanks for your quick reply. But we are executing ME51N here directly then how can transaction variant play role in this. i mean i dont know i am just asking

Read only

0 Likes
2,929

Hi Ashish,

Goto SHD0 .

Provide the Transaction code and see whether there are any variants maintained.

Thanks and Regards,

S.Rajendranath Raparthi.

Read only

0 Likes
2,929

Ok

Read only

rajkumarnarasimman
Active Contributor
0 Likes
2,929

Hi Ashish,

Kindly check whether some enhancements/exit is playing role for filling the header value.

For checking the implicit enhancement use tcode SENH.

Exit:

MEREQ001  Customers' Own Data in Purchase Requisition


Badi:

Name of a BAdI Definition              Description

ME_REQ_HEADER_TEXT            Copy Header Text: Enjoy Purchase Requisition

ME_REQ_SOURCING_CUST       Send requisition to external sourcing system

If you want to find the exact exit which is triggering on your t-code, find the same using debugger.

After all the data entered in billing screen, Press /H  and activate debugger.  once the debugger screen triggered. Press F9 and give the statement as CALL CUSTOMER-FUNCTION and press ok.

The system stops in the appropriate exit.

Regards

Rajkumar Narasimman

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,930

You could check for a BAdI as ME_PROCESS_REQ_CUST methods INITIALIZE and OPEN or ME_REQ_HEADER_TEXT method COPY_HEADER_TEXT may be some code executed that find data in production but not in development or quality (some "wild" text records with partial initial key?)

Edit : After a fast search on OSS, I found a recent note for ME21N with same symptoms 2095429 - Text filled with data for no reason in transaction ME21N (Create Purchase Order) which seems to confirm my analysis, but does nor require error in BAdI implementation .

Regards,

Raymond

Read only

0 Likes
2,929

Thanks a lot Raymond i am checking

Read only

0 Likes
2,929

If confirmed, you could also send a message to SAP OSS Support to inform that the KBA also concerns ME51N (but low priority


Regards,

Raymond

Read only

0 Likes
2,929

Okay Raymond thanks a lot. I will check and get back to you

Read only

0 Likes
2,929

Thanks a lot raymond, i can see #  1 text in STXH and STXL. This might be the reason. If this doesn't get solve i will open another thread.

Thanks,

Ashish T.

Read only

2,929

This Note 2095429 helped.

Read only

LukaszPegiel
SAP Champion
SAP Champion
0 Likes
2,929

We have in our production system same situation. I was in contact with SAP about it and all they could told me is that this probably comes from some z-developments, but they could not found any reason. For sure this happen when you use BAPI_PR_CREATE or BAPI_PR_CHANGE, then during call of this FM in STXH table text is stored with temporary PR number like '#        1', '#      2' etc. So when you open ME51N it reads text for this temporary document number.

The only solution is to clear STXH table, you can use following code :


data: ft_stxh type standard table of stxh.

  field-symbols: <stxh> like line of ft_stxh.

  data: fr_tdname type range of stxh-tdname with header line.

  data: f_part1 type i.

  data: f_part1_ch type char02.

  data: f_part2(5) type n.

  do 50 times.

    add 1 to f_part1.

    if f_part1 < 10.

      f_part1_ch+1(1) = f_part1.

    else.

      f_part1_ch = f_part1.

    endif.

    clear f_part2.

    do 150 times.

      add 10 to f_part2.

      concatenate '#      ' f_part1_ch ' ' f_part2 into fr_tdname-low respecting blanks.

      fr_tdname-sign = 'I'.

      fr_tdname-option = 'EQ'.

      append fr_tdname.

    enddo.

  enddo.

  select tdid tdspras tdname tdobject into corresponding fields of table ft_stxh

    from stxh

    where tdobject      eq 'EBAN'

      and tdname        in fr_tdname .


  select tdid tdspras tdname tdobject appending corresponding fields of table ft_stxh

   from stxh

   where tdobject      eq 'EBANH'

   and tdname        in fr_tdname .


  loop at ft_stxh assigning <stxh>.

    call function 'DELETE_TEXT'

    exporting

*   CLIENT                = SY-MANDT

      id                    = <stxh>-tdid

      language              = <stxh>-tdspras

      name                  = <stxh>-tdname

      object                = <stxh>-tdobject

      savemode_direct       = 'X'

*   TEXTMEMORY_ONLY       = ' '

*   LOCAL_CAT             = ' '

    exceptions

      not_found             = 1

      others                = 2

      .

    if sy-subrc eq 0.

    endif.

endloop.

Read only

0 Likes
2,929

Hi LP,

Thanks a lot for your input. Your answer is also correct but i could award only one correct answer. Thanks again.

Regards,

Ashish T.