on 2020 Mar 23 4:11 AM
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi
Look for the field OBJNR in VBAK - table (VBAK-OBJNR)
Go to JSET table to get the description
You can use the FM STATUS_READ to read the sales order status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This my code. but when i debug, I can not get value of vbak-objnr. is it wrong?
DATA : it_status TYPE STANDARD TABLE OF JEST,
wa_status LIKE LINE OF it_status.
CALL FUNCTION 'STATUS_READ'
EXPORTING
CLIENT = SY-MANDT
objnr = vbak-objnr
ONLY_ACTIVE = ' '
* IMPORTING
* OBTYP =
* STSMA =
* STONR =
TABLES
STATUS = it_status
EXCEPTIONS
OBJECT_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
IN SE11 - open the table VBAK and query for that Sales order
See if OBJNR is populated.
If, so kindly paste the whole code, because what to see how you you get the value before calling this function
OR
Write like this
data : wa_order type vbak-vbeln.
Select single vbeln into wa_vbeln from vbak where vbeln = <your salesorder>
Then pass the wa_vbeln to the function module
why i get worng value in it_status. the value should be in STAT column
like
STAT
E0001X
E0002
I0002
DATA : it_status TYPE STANDARD TABLE OF jest,
wa_status LIKE LINE OF it_status,
lv_objnr TYPE vbak-objnr.
SELECT SINGLE objnr FROM vbak INTO lv_objnr WHERE vbeln = vbak-vbeln.
CALL FUNCTION 'STATUS_READ'
EXPORTING
CLIENT = sy-mandt
objnr = lv_objnr
ONLY_ACTIVE = ' '
* IMPORTING
* OBTYP =
* STSMA =
* STONR =
TABLES
STATUS = it_status
EXCEPTIONS
OBJECT_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
BREAK-POINT.
Change like this
DATA: it_status TYPESTANDARDTABLEOF JSTAT, <============= correct here
wa_status LIKELINEOF it_status,
lv_objnr TYPE vbak-objnr.
User | Count |
---|---|
49 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.