cancel
Showing results for 
Search instead for 
Did you mean: 

Routine in Infopckage?

Former Member
0 Kudos

Expert's,

I need to write a ABAP code in the infopackage screen can any one give a piece of code.

requriement is :

If 'Zabc' is blank then pick that record.

also tell me what is the difference between writing the routine in Update rules and also in Infocpackage.

points will be definitely assigned .

thanks in advance.

vasu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can any one please look into it?

Former Member
0 Kudos

Please?

Former Member
0 Kudos

Hi,

prerequisite is, that ZABC is ready for selection in info package.

DATA: L_IDX LIKE SY-TABIX.

READ TABLE L_T_RANGE WITH KEY

FIELDNAME = 'ZABC'.

L_IDX = SY-TABIX.

*....

L_T_RANGE-LOW = ' '. "number of blanks corresponding to length of field

L_T_RANGE-SIGN = 'I'.

L_T_RANGE-OPTION = 'EQ'.

MODIFY L_T_RANGE INDEX L_IDX.

P_SUBRC = 0.

Selection in info package means selection in ERP.

If you want to delete records in update rule, RFC and all staging areas (e.g.PSA)

would be processed before deletion.

Regards

Joe

Former Member
0 Kudos

Thanks it is syntactically correct!

can you just explain this code line by line so that it helps to understand in detail.

Former Member
0 Kudos

Hi,

DATA: L_IDX LIKE SY-TABIX.

READ TABLE L_T_RANGE WITH KEY

FIELDNAME = 'ZABC'.

L_IDX = SY-TABIX.

<b>In the lines before table L_T_RANGE is read.

It contains all selectable fields with values for selection</b>

L_T_RANGE-LOW = ' '. "number of blanks corresponding to length of field

<b>In this case L_T_RANGE-LOW represents a single value restricted with blanks</b>

L_T_RANGE-SIGN = 'I'.

<b>‘I’ means value is included, ‘E’ is for intervals and means exclusion</b>

L_T_RANGE-OPTION = 'EQ'.

<b>‘EQ’ is for single values, ‘BT’(between) or ‘NB’(not between) only valid for intervals</b>

MODIFY L_T_RANGE INDEX L_IDX.

<b>Updating modified entry of internal table</b>

P_SUBRC = 0.

<b>Please see info for routine</b>

<b>If you want to select intervals, you could also determine value for L_T_RANGE-HIGH</b>

Hope this helps

Joe

Former Member
0 Kudos

DATA: L_IDX LIKE SY-TABIX.

<b>* Define a range which would hold the values that is required</b>

READ TABLE L_T_RANGE WITH KEY

FIELDNAME = 'ZABC'.

<b>*SY-TABIX would hold the table index at runtime</b>

L_IDX = SY-TABIX.

*....

<b>*Populating the range of values that is required (here blank is required)</b>

L_T_RANGE-LOW = ' '. "number of blanks corresponding to length of field

<b>* Sign = 'I' would mean include this value (Blank)</b>

L_T_RANGE-SIGN = 'I'.

<b>* Option = 'EQ' would mean value that is required(Blank)</b>

L_T_RANGE-OPTION = 'EQ'.

<b>*Have these values stored in a table</b>

MODIFY L_T_RANGE INDEX L_IDX.

P_SUBRC = 0.

<b>* The values stored in this table would be used as a filter to pick up values</b>

Answers (0)