Application Development 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: 

Getting corresponding charecterirstic value from ausp by passing tplnr

Former Member
0 Kudos

Dear Experts,

I am trying to write a simple query to pass the TPLNR to OBJEK in ausp along with converted ATINN (for AP_HOLD) and get the charateristic value (ATWRT). Somehow I am not able to succeed in this. I tried it in few ways. It is ending with error. Somehow I could not relate it.

tplnr is my parameters.

I am trying in following way.

REPORT zab_samplevendor.

TABLES : ekbe, rbkp_blocked,ekko,viqmel,iloa,ausp.

PARAMETERS : char1(20) TYPE C.

TYPES:BEGIN OF zausp,

objek TYPE ausp-objek,

atinn TYPE ausp-atinn,

atwrt TYPE ausp-atwrt,

END OF zausp.

SELECT objek atinn atwrt into table it_ausp FROM ausp.

" this sample program should/will get funclocand find its AP_HOLD characteristics value

loop at it_ausp.

WRITE :/10 ausp-objek.

I am not able to figure out where I am actually committing mistake. At debug I can see values in the table.

I would welcome your ideas/suggestions.

Thank you.

Best regards.

9 REPLIES 9

former_member404244
Active Contributor
0 Kudos

Hi,

Did you check AUSP by specifying the values from SE16?

Regards,

Nagaraj

0 Kudos

Yes. I checked AUSP after specifying values. It shows some data.

I think there is something wrong in my query.

Now i am just trying to print somm values from AUSP tables. Still I am not able to get it printed.

I also tried by defining structure.

TYPES:BEGIN OF zausp,

objek TYPE ausp-objek,

atinn TYPE ausp-atinn,

atwrt TYPE ausp-atwrt,

END OF zausp.

DATA : it_ausp TYPE TABLE OF zausp WITH HEADER LINE.

select objek atinn atwrt into CORRESPONDING FIELDS OF TABLE it_ausp from ausp.

write:/10 ausp-atinn, 30 ausp-atwrt.

0 Kudos

Hi,

I don't see any where condition in your select query.. The select query which you have written will get all the values from the table AUSP.

Make sure the table data you are seeing and the program which you are running belong to same client.

Regards,

Nagaraj

0 Kudos

I know there is no where condition. I am struggling to relate objek with tplnr. I am trying to get atinn (characteristic) and atwrt (charecter value). I want to pass TPLNR to OBJEK in ausp along with converted ATINN (for AP_HOLD) and get the charateristic value (ATWRT). Earlier i tried with where condition.

SELECT objek atinn atwrt into table it_ausp FROM ausp

WHERE objek = iloa-tplnr.

It doesn't work as tplnr will be my input. I am not able to relate it. Any idea/suggestion how should I relate it?

Best regards.

0 Kudos

Hi,

Use the function module ''BAPI_OBJCL_GETDETAIL'', also you can give a try with 'CLAF_CLASSIFICATION_OF_OBJECTS' and also check the database view KSSKAUSP.

TPLNR is having 30 char.. so if the number is 10 char prefix 20 zero;s before it and see.

Also AUSP table will be having other classfication values such as (Material , Batch) so don't use direct query without where condition.

Regards,

Nagaraj

0 Kudos

Nagaraj,

Indeed thank you vary much for your advice/suggestion. I will try for that now.

I will have to look for the relation between these two objek and tplnr.

Thank you once again.

Best regards.

0 Kudos

Experts,

Could anyone guide me to get relationship between OBJEK, OBJNR and TPLNR. I referred ILOA,IFLOT,CAWN,CABN,AUSP,CAWNT,IFLO tables. I am looking to pass TPLNR to OBJEK. I have succeeded to get functional location number and its corresponding po number or notification number. Now I am looking to get internal characteristic(ATINN) and characteristic value (ATWRT). I referred FM like BAPI_CHARACT_GETLIST, CLAF_CLASSIFICATION_OF_OBJECTS, BAPI_OBJCL_GETDETAIL, CLFM_SELECT_AUSP. I could not get the exact results which I should get. I referred tables and dara resides there.

Following is what I have done till.

TYPES : BEGIN OF tp_tplnr,

tplnr TYPE iflo-tplnr,

END OF tp_tplnr.

TYPES:BEGIN OF zausp,

objek TYPE ausp-objek,

atinn TYPE ausp-atinn,

atwrt TYPE ausp-atwrt,

END OF zausp.

DATA : it_ausp TYPE TABLE OF zausp WITH HEADER LINE.

DATA : it_tp TYPE TABLE OF tp_tplnr WITH HEADER LINE.

WRITE:/10 'Objects to be classified'.

SELECT objek atinn atwrt INTO CORRESPONDING FIELDS OF TABLE it_ausp

FROM ausp

WHERE objek = in_tplnr AND atinn = 'N'.

WRITE :/10 ausp-objek, 30 ausp-atinn, 50 ausp-atwrt.

Share your ideas/suggestions.Thank you.

0 Kudos

Hi,

Before select statement for AUSP, try using the conversion exit for TPLNR.

With regards,

Vamsi

0 Kudos

@vamsi, Thank you for the response.

Issue is resolved. I changed the condition along with the write statement.

Best regards.