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

getting all records

Former Member
0 Likes
733

Hi

I have this Macro running in my report that gets the salary change info. In our system if someone trying to chg the salary it creates a copy of the original record, let the user change the data and puts an X in lock indicator.

So when i ran the report that macro only pulls the original record not the one with loc can any one help?

here is the macro


  PNP_SET_EXT_PERNR_SEL_CONDS syhr_ext_pernr_sel_conds[]
                              syhr_evaluation_begda
                              syhr_evaluation_endda.

before calling it the report setsup the "syhr_ext_pernr_sel_conds[]"


* conditions for IT0008-SPRPS  [P0008]
  LOOP AT SP
* conditions for IT0008-SPRPS  [P0008]
  LOOP AT SP$00001.
    CLEAR syhr_ext_pernr_sel_conds_wa.
    syhr_ext_pernr_sel_conds_wa-tclas = 'A'.
    syhr_ext_pernr_sel_conds_wa-infty = '0008'.
    syhr_ext_pernr_sel_conds_wa-fieldname = 'SPRPS'.
    syhr_ext_pernr_sel_conds_wa-fieldkind = ' '.
    syhr_ext_pernr_sel_conds_wa-sign = SP$00001-sign.
    syhr_ext_pernr_sel_conds_wa-opti = SP$00001-option.
    syhr_ext_pernr_sel_conds_wa-low = SP$00001-low.
    syhr_ext_pernr_sel_conds_wa-high = SP$00001-high.
    syhr_ext_pernr_sel_conds_wa-otype = ' '.
    syhr_ext_pernr_sel_conds_wa-rsign = ' '.
    syhr_ext_pernr_sel_conds_wa-relat = ' '.
    syhr_ext_pernr_sel_conds_wa-sclas = ' '.
    APPEND syhr_ext_pernr_sel_conds_wa TO syhr_ext_pernr_sel_conds.
  ENDLOOP.

.
    CLEAR syhr_ext_pernr_sel_conds_wa.
    syhr_ext_pernr_sel_conds_wa-tclas = 'A'.
    syhr_ext_pernr_sel_conds_wa-infty = '0008'.
    syhr_ext_pernr_sel_conds_wa-fieldname = 'SPRPS'.
    syhr_ext_pernr_sel_conds_wa-fieldkind = ' '.
    syhr_ext_pernr_sel_conds_wa-sign = SP
* conditions for IT0008-SPRPS  [P0008]
  LOOP AT SP$00001.
    CLEAR syhr_ext_pernr_sel_conds_wa.
    syhr_ext_pernr_sel_conds_wa-tclas = 'A'.
    syhr_ext_pernr_sel_conds_wa-infty = '0008'.
    syhr_ext_pernr_sel_conds_wa-fieldname = 'SPRPS'.
    syhr_ext_pernr_sel_conds_wa-fieldkind = ' '.
    syhr_ext_pernr_sel_conds_wa-sign = SP$00001-sign.
    syhr_ext_pernr_sel_conds_wa-opti = SP$00001-option.
    syhr_ext_pernr_sel_conds_wa-low = SP$00001-low.
    syhr_ext_pernr_sel_conds_wa-high = SP$00001-high.
    syhr_ext_pernr_sel_conds_wa-otype = ' '.
    syhr_ext_pernr_sel_conds_wa-rsign = ' '.
    syhr_ext_pernr_sel_conds_wa-relat = ' '.
    syhr_ext_pernr_sel_conds_wa-sclas = ' '.
    APPEND syhr_ext_pernr_sel_conds_wa TO syhr_ext_pernr_sel_conds.
  ENDLOOP.

-sign.
    syhr_ext_pernr_sel_conds_wa-opti = SP
* conditions for IT0008-SPRPS  [P0008]
  LOOP AT SP$00001.
    CLEAR syhr_ext_pernr_sel_conds_wa.
    syhr_ext_pernr_sel_conds_wa-tclas = 'A'.
    syhr_ext_pernr_sel_conds_wa-infty = '0008'.
    syhr_ext_pernr_sel_conds_wa-fieldname = 'SPRPS'.
    syhr_ext_pernr_sel_conds_wa-fieldkind = ' '.
    syhr_ext_pernr_sel_conds_wa-sign = SP$00001-sign.
    syhr_ext_pernr_sel_conds_wa-opti = SP$00001-option.
    syhr_ext_pernr_sel_conds_wa-low = SP$00001-low.
    syhr_ext_pernr_sel_conds_wa-high = SP$00001-high.
    syhr_ext_pernr_sel_conds_wa-otype = ' '.
    syhr_ext_pernr_sel_conds_wa-rsign = ' '.
    syhr_ext_pernr_sel_conds_wa-relat = ' '.
    syhr_ext_pernr_sel_conds_wa-sclas = ' '.
    APPEND syhr_ext_pernr_sel_conds_wa TO syhr_ext_pernr_sel_conds.
  ENDLOOP.

-option.
    syhr_ext_pernr_sel_conds_wa-low = SP
* conditions for IT0008-SPRPS  [P0008]
  LOOP AT SP$00001.
    CLEAR syhr_ext_pernr_sel_conds_wa.
    syhr_ext_pernr_sel_conds_wa-tclas = 'A'.
    syhr_ext_pernr_sel_conds_wa-infty = '0008'.
    syhr_ext_pernr_sel_conds_wa-fieldname = 'SPRPS'.
    syhr_ext_pernr_sel_conds_wa-fieldkind = ' '.
    syhr_ext_pernr_sel_conds_wa-sign = SP$00001-sign.
    syhr_ext_pernr_sel_conds_wa-opti = SP$00001-option.
    syhr_ext_pernr_sel_conds_wa-low = SP$00001-low.
    syhr_ext_pernr_sel_conds_wa-high = SP$00001-high.
    syhr_ext_pernr_sel_conds_wa-otype = ' '.
    syhr_ext_pernr_sel_conds_wa-rsign = ' '.
    syhr_ext_pernr_sel_conds_wa-relat = ' '.
    syhr_ext_pernr_sel_conds_wa-sclas = ' '.
    APPEND syhr_ext_pernr_sel_conds_wa TO syhr_ext_pernr_sel_conds.
  ENDLOOP.

-low.
    syhr_ext_pernr_sel_conds_wa-high = SP
* conditions for IT0008-SPRPS  [P0008]
  LOOP AT SP$00001.
    CLEAR syhr_ext_pernr_sel_conds_wa.
    syhr_ext_pernr_sel_conds_wa-tclas = 'A'.
    syhr_ext_pernr_sel_conds_wa-infty = '0008'.
    syhr_ext_pernr_sel_conds_wa-fieldname = 'SPRPS'.
    syhr_ext_pernr_sel_conds_wa-fieldkind = ' '.
    syhr_ext_pernr_sel_conds_wa-sign = SP$00001-sign.
    syhr_ext_pernr_sel_conds_wa-opti = SP$00001-option.
    syhr_ext_pernr_sel_conds_wa-low = SP$00001-low.
    syhr_ext_pernr_sel_conds_wa-high = SP$00001-high.
    syhr_ext_pernr_sel_conds_wa-otype = ' '.
    syhr_ext_pernr_sel_conds_wa-rsign = ' '.
    syhr_ext_pernr_sel_conds_wa-relat = ' '.
    syhr_ext_pernr_sel_conds_wa-sclas = ' '.
    APPEND syhr_ext_pernr_sel_conds_wa TO syhr_ext_pernr_sel_conds.
  ENDLOOP.

-high.
    syhr_ext_pernr_sel_conds_wa-otype = ' '.
    syhr_ext_pernr_sel_conds_wa-rsign = ' '.
    syhr_ext_pernr_sel_conds_wa-relat = ' '.
    syhr_ext_pernr_sel_conds_wa-sclas = ' '.
    APPEND syhr_ext_pernr_sel_conds_wa TO syhr_ext_pernr_sel_conds.
  ENDLOOP.

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
591

If your report is tied to the PNP, you can put the following in the initialization/start-of-selection event.

<b> pnp-sw-ignorelockedrecords = 'N'.</b>

~Suresh

3 REPLIES 3
Read only

suresh_datti
Active Contributor
0 Likes
592

If your report is tied to the PNP, you can put the following in the initialization/start-of-selection event.

<b> pnp-sw-ignorelockedrecords = 'N'.</b>

~Suresh

Read only

0 Likes
591

Thank you so much for saving me.

I was trying to solve this the whole day and that simple line did the trick...

I have rewarded you points too

Read only

0 Likes
591

Hey..don't worry, thanks to SDN, next time you will be done in the fraction of a second..

~Suresh