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

BAPI

Former Member
0 Likes
1,246

Hi,

I need to know which BAPI to use to update IE02 user status and system status.

Thnks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,197

Hi Reson,

You can also look into the Where-used-list for the BAPIS thru SE37 txn to see where and how they have been used. It will give you some idea.

Cheers,

Vikram

11 REPLIES 11
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,197

This looks like it may be helpful.

ALM_ME_EQUI_USTATUS_CHANGE

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,197

Hi,

Try this BAPI <b>BAPI_EQUI_CHANGE</b>

Regards

vijay

Read only

Former Member
0 Likes
1,197

Hi Reson,

Try following BAPI :

BAPI_EQUI_CHANGE or

BAPI_EQMT_MODIFY.

Cheers,

Vikram

Pls reward for helpful replies!!

Read only

Former Member
0 Likes
1,197

Hi Friends,

Thnks for ur replies. I am using bapi's for the first time. Related to the user status and system status updating, can someone please guide me as to where to look in the bapi and how to go about it.

Your help is highly appreciated.

Thnks.

Read only

0 Likes
1,197

Hi,

Refer the transaction BAPI to find all the BAPI's.

BAPIs. A nice way to work with your data without learning the SAP data model. BAPIs are functions that are "published" by SAP for customer use. They are very well documented and bring less surprises than internal functions. Go to transaction BAPI to get the tree of the functions by functional areas. In addition to simply using them for data extracts or updates you can look into their source code to understand how the data is organized (but this is not an easy task). BAPIs are the first thing to check if you need to update the data (the next thing would probably be BDC - described in Knowledge Corner as well). Using BAPIs for updates can speed up your program significantly (like 100 times!). You can use them to select the data, but of course if you know how to access the database directly, simple select will work faster. Sometimes BAPIs are the only way to get the data, as it is the case with accessing some objects in APO (that are stored only in "Livecache" memory).

Also, refer the following link for the list of BAPI's

http://www.planetsap.com/LIST_ALL_BAPIs.htm

<b>Reward points if it helps.</b>

Read only

0 Likes
1,197
Read only

Former Member
0 Likes
1,197

Thnks for the links guys but i am still locked with the fact that i have to use bapi's. if comeone could explain in relation to what i want it wud be easier for me to understand.

Related to the user status and system status updating of IE02, can someone please guide me as to where to look in the bapi BAPI_EQMT_MODIFY OR BAPI_EQUI_CHANGEand how to go about it.

Your help is highly appreciated.

Thnks.

Read only

ferry_lianto
Active Contributor
0 Likes
1,197

Hi,

You can go transaction code <b>BAPI</b> to browse above BAPIs. There are some documentation as well over there.

Other way, you can go to transaction <b>SE37</b> and enter the above BAPI name and click on diplay.

Sometimes, you can get the documentation by click on Function Module Documentation button.

Have you looked this function module <b>STATUS_CHANGE_FOR_ACTIVITY</b> to change the status?

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

Former Member
0 Likes
1,198

Hi Reson,

You can also look into the Where-used-list for the BAPIS thru SE37 txn to see where and how they have been used. It will give you some idea.

Cheers,

Vikram

Read only

Former Member
0 Likes
1,197

Hi Reson,

If ur requirement is to change the userstatus of the equipment, U can use the FM

STATUS_CHANGE_EXTERN' , followed by

STATUS_UPDATE_DIALOG.

See this Example code.

DATA: lws_estat LIKE tj30t-estat,

lws_objnr LIKE jsto-objnr,

lws_jsto LIKE jsto,

ws_value LIKE equi-equnr,

ws_status LIKE tj30t-txt04,

ws_stsma LIKE tj30t-stsma.

ws_value = '10123150'.

ws_status = 'LI'.

ws_stsma = 'PM_EQ_02'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = ws_value

IMPORTING

OUTPUT = ws_value.

CONCATENATE 'IE' ws_value INTO lws_objnr.

-


Use this FM if u don't know the value of ws_stsma

CALL FUNCTION 'STATUS_OBJECT_READ'

EXPORTING

objnr = lws_objnr

IMPORTING

e_jsto = lws_jsto

EXCEPTIONS

object_not_found = 1

OTHERS = 2.

In this case use lws_jsto-stsma in place of ws_stsma

-


  • Get Status code

SELECT SINGLE estat INTO lws_estat

FROM tj30t

WHERE txt04 EQ ws_status "LI

AND spras EQ sy-langu+0(1)

AND stsma EQ ws_stsma.

IF sy-subrc = 0.

CALL FUNCTION 'STATUS_CHANGE_EXTERN'

EXPORTING

client = sy-mandt

objnr = lws_objnr

user_status = lws_estat

EXCEPTIONS

object_not_found = 1

status_inconsistent = 2

status_not_allowed = 3

OTHERS = 4.

IF sy-subrc = 0.

CALL FUNCTION 'STATUS_UPDATE_DIALOG'.

ENDIF.