cancel
Showing results for 
Search instead for 
Did you mean: 

Query Join NAST x LIKP

Former Member
0 Kudos

Hello everyone,

I need to create a query for see the status from delivery.

When I try to create a join between the table NAST and LIKP with the fields:

NAST-OBJKY

LIKP-VBELN

Donu2019t find anything because in the nast table, field OBJKY, for see the delivery itu2019s necessary to add u201C0u201D in the initial number.

How Can I create this join?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

Define in the infoset an additional field for the status, and write the algorithm with ABAP, so you could concatenate the zero to delivery number.

Regards,

Eduardo

Former Member
0 Kudos

Thank you for your answer Eduardo.

Where can I write the algorithm? In the Infoset? I tried to insert in the infoset the concatenate the zero to delivery number, but doesnu2019t works.

I need to create a query to obtain a search for output type a specific plant are using. Is it possible?

Thanks in advance

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

In tcode SQ02, go to Extras, and create an additional field. You have an icon (a page with lines) 'coding for additions'. If you clic it, it goes to an ABAP editor. Remember to add this field to a field group.

An example for your case (if you dont know ABAP, look for an ABAPer):

eg: the field is called STATUS.

TABLES: nast. "if you dont add to infoset.

DATA: del_number LIKE nast-objky.

del_number(1) = '0'.

del_number+1(10) = likp-vbeln.

SELECT SINGLE * FROM nast

WHERE objky = del_number

AND kschl = type_of_message_searched

IF sy-subrc = 0. "THE MESSAGE EXISTS, OR filter by other fields (date, number of message, medium,...)

STATUS = 'true' or the value desired.

ENDIF.

I hope this helps you

Regards

Eduardo

Answers (0)