Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10116

Re: Please help: Problems with Dynamic actions

$
0
0

Hi Nani,

 

I don't think that will work via dynamic actions the way you want it. You are dynamically inserting infotype 1 and after that the default one from the hiring action.

 

I'd use the user exit PBAS0001 (which is for setting default values). Used that a couple of times so far and it's working good.

 

As an example some value for infotype 17 and 10, depending on the accounting area:

 

tables: pa0001.

DATA: i0017 LIKE p0017.

DATA: i0010 LIKE p0010


 

CASE INNNN-INFTY.

     when '0017'.

          MOVE INNNN TO I0017.

 

          select single * from pa0001 where pernr = i0017-pernr
                                 and   endda ge i0017-begda
                                 and   begda le i0017-endda.
    
          if sy-subrc = 0 andpa0001-bukrs = '1106'.      

              i0017-pkwrg = '4'.

            endif.
          endif.

          MOVE I0017 TO INNNN.

 

    

     when '0010'.

        CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING
              PRELP = INNNN
            IMPORTING
              PNNNN = I0010.

 

          select single * from pa0001 where pernr = i0010-pernr
                                 and   endda ge i0010-begda
                                 and   begda le i0010-endda.


          if sy-subrc = 0 and pa0001-bukrs = '1106'.            

             i0010-sonre = 'S1'.     
          endif.


          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
            EXPORTING
              PNNNN = I0010
            IMPORTING
              PRELP = INNNN.

     ENDCASE.


 

Regards

Marc



Viewing all articles
Browse latest Browse all 10116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>