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

Removing Hard coded values from print program in smart form

Former Member
0 Likes
422

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

1 REPLY 1
Read only

former_member404244
Active Contributor
0 Likes
311

Hi ,

I don't think atinn is required as u will get the respected charcaterisctis..If iam not wrong in ur case u r retriving material charactristics...

u can also try CLAF_CLASSIFICATION_OF_OBJECTS function module to get the characteristcis...

But the FM will slow ur performance of ur program...

u should never try retriving with atinn as the number changes from client to client,

Regards,

Nagaraj