Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ABAP to get the status of a production order

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to use ABAP to get the status of production orders". In daily operation, I believe many people have doubts about how to use ABAP to obtain the status of production orders. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to use ABAP to get the status of production orders". Next, please follow the editor to study!

In S/4HANA, how do we check the status of a production order based on the line items of a sales order?

Double-click the line item:

Click Schedule line:

Here you can see the ID and status of the production order.

Where the status of the order is stored in the table vsaufk, note that the order and status can be a 1-to-many relationship.

The ID and description of the state are stored in the table tj02t, so you have the following code:

METHOD get_prod_order_status.DATA: lt_status TYPE TABLE OF j_status,lt_text TYPE TABLE OF tj02t,lv_id LIKE iv_prod_order_id Ls_result LIKE LINE OF rt_status_in_s4_format.lv_id = iv_prod_order_id.CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'EXPORTINGinput = lv_idIMPORTINGoutput = lv_id.SELECT stat INTO TABLE lt_status FROM vsaufk WHERE inact = space ANDaufnr = lv_id.CHECK sy-subrc = 0.SELECT * INTO TABLE lt_text FROM tj02t FOR ALL ENTRIES IN lt_statusWHERE istat = lt_status-table_line AND spras =' EN'.LOOP AT lt_text ASSIGNING FIELD-SYMBOL () .CLEAR : ls_result.ls_result-status_id =-istat.ls_result-status_code =-txt04.ls_result-status_text =-txt30.APPEND ls_result TO rt_status_in_s4_format.ENDLOOP.ENDMETHOD.

Test it and successfully get all the states, as seen in the transaction code CO03.

At this point, the study on "how to use ABAP to get the status of production orders" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report