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

Can we write a code in this query.

Former Member
0 Likes
2,103

Dear experts,

I would like to map these tables together : LIPS,LIKP,and LTAK.

But in case there are no Transfer order exist , system will respond "No data was selected"  (actually , it existed in LIPS and LIKP )

So I would like to know can we write a code or change something in this query so that if it cannot find any Transfer order it still show the data but let the Transfer order field blank .

P/s : I think this question is about coding so I posted it in here ,if it's not correct please move it to suitable group

Thanks and Best Regards,

Huong

1 ACCEPTED SOLUTION
Read only

SimoneMilesi
Active Contributor
0 Likes
2,070

If you need just TANUM, i suggest you to add LTAK as Additional field and read it in coding part of the query, event "Record elaboration" so you can manage any message you want.

7 REPLIES 7
Read only

SimoneMilesi
Active Contributor
0 Likes
2,072

If you need just TANUM, i suggest you to add LTAK as Additional field and read it in coding part of the query, event "Record elaboration" so you can manage any message you want.

Read only

0 Likes
2,070

Hi Simone,

Please advise me about the code.

How is it should be ? I am not an abaper so I cannot write it ?

Thank you so much.

Huong

Read only

0 Likes
2,070

hello,

you can try something like


CLEAR tanum.

SELECT SINGLE tanum INTO tanum FROM ltak WHERE vbeln = likp-vbeln

                                                            AND lgnum = likp-lgnum

Read only

0 Likes
2,070

I tried another one and it's ok.Thank you so much for you help.

Read only

0 Likes
2,070

Hi Simone,

I thought it worked but it didn't.The Transfer order always show "00000000".

Please check and advise.I also tried with additional table and field.These are the code :

In case of table :

And in case of field :

Read only

0 Likes
2,070

Since TANUM is NUMC, if you do not have a record in LTAK, 000000 is correct.

Anyway, try to move your coding in

Read only

0 Likes
2,069

Dear Simone,

The issue is that when we have the TO number but system still show "0000000".

And could you please advise me about the code :

I move it into code field but nothing happen.I still got the error.What should I do now ?

Could you please show it step by step .Thank you so much.