cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Hard coded values from a particular field in print program

Former Member
0 Kudos

Hi All,

I have one Doubt:

In the current Alcohol Content Form Z***, the data for the Alcohol Rate Volume and Weight is derived from Characteristics used in the material master. On table field level the characteristic field automatically gets an internal characteristic number assigned. In the print program used in the alcohol content form this number is hard coded. The assigned number however can change per SAP client, which is currently the case. As a consequence the form works correct in the E10 client, but it doesn't work correct in other SAP clients. The issue can be solved by making use of particular include which will pick up the correct value per SAP client.

But How to Make use of a Particular Include.

The Abap selection Code is:

SELECT objek

atinn

atwrt

FROM ausp

INTO TABLE p_it_alcohol

FOR ALL ENTRIES IN it_objek

WHERE objek = it_objek-objek AND

mafid = 'O' AND

klart = '001' and

atinn in (0000000911,0000000912) .how to remove hard coded values(0000000911,0000000912) and use include in selection logic.any pointers alongwith the code will be appreciated?

Regards,

Rahul

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

AUSP-ATINN will link to CABN-ATINN.

If the characteristic name (CABN-ATNAM) is the same in all clients then you need to replace


atinn in (0000000911,0000000912) 

with


atinn in (select atinn from cabn where atnam = x or atnam = y)

replacing x and y with the appropriate characteristic names that match 0000000911 & 0000000912 in client E10.

Answers (1)

Answers (1)

Former Member
0 Kudos

create a range and populate ur values from the include into that range.

to create ranges:

ranges: r_atinn for ausp-atinn

now

populate ur range like this:

r_atinn-sign = 'I'.

r_atinn-option = 'EQ'.

r_atinn-low = <value>.

append r_vbtyp.

now use this range in ur select like

where atinn in r_atinn.