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

Need Help...

Former Member
0 Likes
360

Hi Friends,

I have a task which should display the status of the production order.

If an order number(AUFNR) is given, it should display whether the order is available or not. Also it should display the status of the order whether it is delivered, completed, blocked etc.

Can anyone send me the code for the above task.

Waiting for ur reply.

Raj

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
334

Sure, check this out.



report zrich_0001.

data: po_status like  bsvx-sttxt.
data: xaufk type aufk.

parameters: p_aufnr type aufk-aufnr.

select single * from aufk
              into xaufk
              where aufnr = p_aufnr.

call function 'STATUS_TEXT_EDIT'
     exporting
          flg_user_stat    = 'X'
          objnr            = xaufk-objnr
          only_active      = 'X'
          spras            = sy-langu
     importing
          line             = po_status
     exceptions
          object_not_found = 01.


write:/ p_aufnr, po_status.

Regards,

Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
335

Sure, check this out.



report zrich_0001.

data: po_status like  bsvx-sttxt.
data: xaufk type aufk.

parameters: p_aufnr type aufk-aufnr.

select single * from aufk
              into xaufk
              where aufnr = p_aufnr.

call function 'STATUS_TEXT_EDIT'
     exporting
          flg_user_stat    = 'X'
          objnr            = xaufk-objnr
          only_active      = 'X'
          spras            = sy-langu
     importing
          line             = po_status
     exceptions
          object_not_found = 01.


write:/ p_aufnr, po_status.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
334

Hi Rich,

Thank u very much for the code.

Raj