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

FUNCTION MODULE STATUS_CHECK

Former Member
0 Likes
3,115

Can anyone please tell me the use of function module STATUS_CHECK in case of sales order creation and how do we select or activate or remove the status using the above function module

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,682

Shah,

i would suggest to use Documentation in se37,

Amit.

2 REPLIES 2
Read only

Former Member
0 Likes
1,682

Hi,

Checks whether a status is set or not.

If the status is set, the function module terminates without an exception.

If the status is not set, the exception STATUS_NOT_ACTIVE is triggered.

CALL FUNCTION 'STATUS_CHECK'

EXPORTING

OBJNR = CAUFVD-OBJNR

STATUS = STATUS_PRINT

EXCEPTIONS

OBJECT_NOT_FOUND = 01

STATUS_NOT_ACTIVE = 02.

  • CHECK SYST-SUBRC = 2. " status is not yet active,

*.. when not yet set, then we should set it now.

CALL FUNCTION 'STATUS_CHANGE_FOR_ACTIVITY'

EXPORTING

ACTIVITY_ALLOWED = ' '

NO_CHECK = 'X'

SET_CHGKZ = 'X'

OBJNR = CAUFVD-OBJNR

VRGNG = Y_RMDR " print status activity

EXCEPTIONS

ACTIVITY_NOT_ALLOWED = 01

OBJECT_NOT_FOUND = 02

STATUS_INCONSISTENT = 03

STATUS_NOT_ALLOWED = 04

WRONG_INPUT = 05.

Regards,

Sujit

Edited by: Sujit Pal on Jul 8, 2008 4:56 PM

Read only

Former Member
0 Likes
1,683

Shah,

i would suggest to use Documentation in se37,

Amit.