cancel
Showing results for 
Search instead for 
Did you mean: 

Routine in Info Package, Debug in Info package.

Former Member
0 Kudos

Hi All,

Requirement is to include multiple ranges in Info Package based on the Conditions.

I want to check whether it is working fine by going into debug mode.

Can any help in this regards.

thanks in advance,

srinivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can use multiple ranges by using the +,- tabs in the "Data selection" sub-tab of infopakage.

Try pulling data into only PSA and that should help to verify if working or not..It never failed in my case!!

Gopi

Former Member
0 Kudos

Any way to add multiple ranges using abap code in Info Package.

I have coditions like,

If var1 = 'x'

move range of values to Info Package variable.

else

move other range of values to Info Package Variables.

endif.

Like i want to send two range of values to Info Package.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Thanks for your help in solving the Multiple ranges for Info Package.

I tried adding the Multiple ranges in the Info package its working fine.

I have multiple range of Purchase order from 100 to 1000 and from 3000 to 5000 i need to process only those PO'S having the Item category NE 2. I have written the Abap Program at Info Package for Item Category NE 2. See the Eg given below,

  • InfoObject = 0ITM_CAT

  • Fieldname = ITM_CAT

  • data type = CHAR

  • length = 000001

  • convexit =

form compute_FISCPER

tables l_t_range structure rssdlrange

changing p_subrc like sy-subrc.

  • Insert source code to current selection field

$$ begin of routine - insert your code only below this line -

read table l_t_range with key fieldname = 'ITM_CAT'.

l_t_range-sign = 'I'.

l_t_range-option = 'NE'.

l_t_range-Low = '2'.

clear l_t_range-high.

modify l_t_range index l_idx.

p_subrc = 0.

It is syntactically correct but while loading the date it is not allowing to load the data.

Thanks in advance.

Regards,

srinivas

edwin_harpino
Active Contributor
0 Kudos

hi Srinivas,

as i know, NE and exclusion doesn't work in infopackage,

to exclude ITM_CAT = 2 you can do it in transfer rules' start routine, or whenever possible in source system user exit zxrsau01.

in transfer rules start routine, change transfer rules, and click blank page icon beside start routine, and put just simple code.

delete datapak where ITM_CAT = '2'.

in zxrsau01

data : l_s_x like [extract structure].

when '[datasource name]'.

loop at c_t_data into l_s_x.

if l_s_x-itm_cat = '2'.

delete c_t_data.

endif.

endloop.

hope this helps.

Former Member
0 Kudos

Hi,

Thanks for your suggestion, it will work if i filter the records at Transfer rule level but the problem is from the data source i am loading the data to different data targets.

I need to put this condition for only one Data Target. As you said no way in writting the code like this in Info Package like exclude stmt i will filter the records in Update Rules level.

Thanks for quick response.

Regards,

srinivas

edwin_harpino
Active Contributor
0 Kudos

hi Srinivas,

yes, then you can filter it in update rules' start routine

delete data_pakacage where ITM_CAT = '2'.

hope this helps.

  • hope will see some green stars/very helpful answers if they are

Former Member
0 Kudos

Hello Sirnivas,

your programm contains a little error. You forgot the index!

You wrote...


read table l_t_range with key fieldname = 'ITM_CAT'.

l_t_range-sign = 'I'.
l_t_range-option = 'NE'.
l_t_range-Low = '2'.
clear l_t_range-high.

modify l_t_range index l_idx.

This will work better...


read table l_t_range with key fieldname = 'ITM_CAT'.

<b>l_idx = sy-tabix.</b>

l_t_range-sign = 'I'.
l_t_range-option = 'NE'.
l_t_range-Low = '2'.
clear l_t_range-high.

modify l_t_range index l_idx.

You can also add more selections by adding lines to l_t_range.

example:


data: l_idx like sy-tabix.
data: l_t_range2 like l_t_range.
          read table l_t_range with key
               fieldname = 'ITM_CAT'.
          l_idx = sy-tabix.

          l_t_range-sign = 'I'.
          l_t_range-option = 'NE'.
          l_t_range-Low = '2'.
          clear l_t_range-high.

          modify l_t_range index l_idx.

          move-corresponding l_t_range to l_t_range2.

          l_t_range2-sign = 'I'.
          l_t_range2-option = 'NE'.
          l_t_range2-Low = '3'.
          clear l_t_range2-high.

          append l_t_range2 to l_t_range.

I hope this helps you!

Regards

Message was edited by: Vazquez Dominik

Former Member
0 Kudos

Hello Dominik,

In the Message which i posted forgot to add the Line <b>l_idx = sy-tabix.</b>

But this line is there in my code, i checked again but it is not loading the data and find below the Error Message which i got when loading the data,

<b>For sel. field 'DOC_CAT ', no selection with SIGN = 'I '; OPTION 'NE ' allowed</b>

Please try from your end whether u can able to load the data or not and let me know if any other way to write the Code.

Thanks for your help.

Regards,

srinivas

Former Member
0 Kudos

Hi Srinivas,

In the data selection tab, select the field for which you want to enter multiple selection and click the 'Insert Duplicate Row' button(one with + sign) that is avalaible at the bottom, next to 'check' button.

This will create a duplicate row for same field where you can enter the other selection values for the same field. You can create as many as you want.

Regards,

Prema.

edwin_harpino
Active Contributor
0 Kudos

hi Srinivas,

try put a loop on the routine,

data : debug(1).

do.

if debug = 'X'.

exit.

endif.

enddo.

and when run infopackage, go to sm50,

on that process, menu program->debug program,

in debug screen, type in debug, and fill with X and click 'edit'-pencil icon.

F5 to next step.

hope this helps.