Skip to Content
author's profile photo Former Member
Former Member

probleme with HR_MAINTAIN_MASTERDATA in user_exit of infotype ZXPADU02

Hi experts,

I am trying to create an infotype 491 when a new insertion of intype 0006 is done.

The creation of the new occurrence of infotype 491 is done in the include of user_exits ZXPADU02 .

Here is what I coded in the user_exit of 0006:

operation = ipsyst-IOPER.

case innnn-infty.

when '0006'.

if operation = 'MOD' or operation = 'INS'.

ls_pvalues-infty = '0491'.

ls_pvalues-fname = 'P0491-OTF01'.

ls_pvalues-fval = 'RCTV'.

ls_pvalues-seqnr = '00'.

APPEND ls_pvalues TO lt_pvalues.

ls_pvalues-infty = '0491'.

ls_pvalues-fname = 'P0491-OTV01'.

ls_pvalues-fval = 'varctv'.

ls_pvalues-seqnr = '00'.

APPEND ls_pvalues TO lt_pvalues.

CALL FUNCTION 'HR_MAINTAIN_MASTERDATA' ZXPADU02

EXPORTING

pernr = '00000001'

actio = 'INS'

tclas = 'A'

begda = '20150601'

endda = '20150630'

seqnr = '000'

SUBTY = '0001'

luw_mode = '0'

dialog_mode = '2'

no_existence_check = ' '

no_enqueue = ''

IMPORTING

return = return0491

RETURN1 = RETURN1

HR_RETURN = hr_RETURN

TABLES

proposed_values = lt_pvalues

modified_keys = lt_keys.


Every thing sems to be right but when I make a new insertion in infotype 0006 through PA30, I get this message error

error PG015-Required screen change cannot be made.


I can see through dialog_mode thhat the new occurence of 491 I is created but at end is not saved because of this message error that I got.

Since 2 days I am trying to resolve this no thing seems to be coming.

Any idea to resolve this is really appreciated.

PS: when create a 491 in a simple report with HR_MAINTAIN_MASTERDATA and with the same data everything goes right and a new 491 is created.

Thank you.

Rachid.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 26, 2015 at 07:35 PM

    Hi Rachid, not sure why you are using ZXPADU02 . These kind of insertion can be done through dynamic actions . Table : T588Z . Exit ZXPADU02 can be useful generally when you are adding validations on enhanced fields of standard info types . You mentioned same code working through a report .But your work area ls_pvalues is not mapped completely with PERNR , BEGDA and ENDDA even though you are passing these fields to FM work area must be mapped . Generally these kind of error will be raised when some mandatory field is missed . Did you try passing DIALOG_MODE '2' to run in back ground and see the exactly which field is giving error . Thanks Kamesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Kameswararao Gonugunta

      Hi Kamesh,

      I already tried all this.

      After analyzing and debugging deeply the HR_MAINTAIN_MASTERDATA when it is called in ZXPADU02 or in a routine that is called by a dynamic action (Yes, I also tried this with dynamic actions) and the result is the same. No occurrence of 0491 is created whereas the commit work in HR_MAINTAIN_MASTERDATA .


      Here my analysis when HR_MAINTAIN_MASTERDATA is called in routine that is called by a dynamic action:


      The problem is This field PSPAR-PBPFL in HR_MAINTAIN_MASTERDATA is set to 'X', and when I went a little further in debugging I found an OSS note was applied in this perfom


      PERFORM RP_INFOTYP(SAPFP50G) USING

      * pspar-pernr "XDPK005733

      SAVE_PSPAR-PERNR "XDPK005733

      ACTIO

      INFTY

      SUBTY

      * pspar-objps "XDPK005733

      SAVE_PSPAR-OBJPS "XDPK005733

      BEGDA

      ENDDA

      RCODE.


      This perform is located in the PAI module of screen 1000 when CALL DIALOG 'HR_MAINTAIN_MASTER_DATA is triggered in HR_MAINTAIN_MASTERDATA

      The OSS note is:

      * Begin of note 1727144 - Read indicator COMMIT WORK

      CALL FUNCTION 'RH_GET_SUPPRESS_COMMIT_PA'

      IMPORTING

      EV_SUPPRESS_COMMIT = lv_suppress_commit.


      * End of note 1727144

      *IF pspar-pbpfl IS INITIAL. "N800743 "N833984

      *IF pspar-pbpfl IS INITIAL AND sy-binpt IS INITIAL. "N833984

      * Note 1727144 - add lv_suppress_commit


      IF pspar-pbpfl IS INITIAL AND

      sy-binpt IS INITIAL AND

      lv_suppress_commit IS INITIAL.

      COMMIT WORK. "N800743

      ENDIF.


      The problem is that PSPAR-PBPF is set to 'X' by HR_MAINTAIN_MASTERDATA as a result pspar-pbpf is not initial

      sy-binpt is initial

      lv_suppress_commit is initial

      so this condition

      IF pspar-pbpfl IS INITIAL AND

      sy-binpt IS INITIAL AND

      lv_suppress_commit IS INITIAL.


      is never true and and the commit work inside it is never executed

      Something is wrong with this OSS note it does not process all the cases especially when PSPAR-PBPFL is not Initial.


      When I clear out PSPAR-PBPF to get it initial, the condition above is true and the commit work is executed and my occurrence in 0491 is created. All this is in standard code so I can not change antyhing. May be another OSS note is required to fix this issue.



  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2015 at 06:40 PM

    Hello,

    Try to use the FM HR_INFOTYPE_OPERATION instead HR_MAINTAIN_MASTERDATA.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 04, 2016 at 02:54 PM

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

    Dear All

    Can you guys please help me with this issue

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.