Application Development 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: 

Purchase Indent release Strategy Reset or Cancel by using bapi

former_member196331
Active Contributor
0 Kudos

Hi,

I am facing one problem,.

My requirement is I need to Reset the Purchase indent Release Strategy  By using the Bapi. " BAPI_REQUISITION_RESET_RELEASE"

I am passing Import parameters are

NUMBER                          1600000011  = My purchase Document no

ITEM                                   00010        = Indent line number

REL_CODE                                          = Empty

USE_EXCEPTIONS                  X         =  as X

NO_COMMIT_WORK                           =   Empty

But if i Execute the  above one i am getting the error as  ME104  Release outside field of responsibility.

ME104 Release outside field of responsibility

Exception       RESPONSIBILITY_FAIL

Message ID:  ME    Message number:   104

Can any body tell me what is the mistake i had done, If any body say no authorization for releasing the indent, But i am able to do changes in front end means sap i can release i can able to cancel it.

But i have one doubt.

here i am passing  REL_CODE   i am passing empty value am i correct. If it's wrong which value should i pass. i checked in data base(EBAN). Default ,Release_status fields value is empty, once release it value becomes  'X'.  Once cancel it's value becomes  ''  empty, because of this reason i passed the value as empty.


Second way i tried REL_CODE  this field belongs to  T161E Table(As per my knowledge)., In this table only one value(One row) i am having ie. 02 .

I tried to pass 02 also but not working.

Need your valuable suggestions.

      


1 ACCEPTED SOLUTION

former_member196331
Active Contributor

Any information please.

6 REPLIES 6

former_member196331
Active Contributor

Any information please.

0 Kudos

please check table T16FC - 16FC (Release Codes). u can get proper relese code.


Because RREL_CODE  should not be blank.

Also , send screen shot of error status.

0 Kudos

Thank u  Sir, I hope it's working. Checking  , i will update to u later.

0 Kudos

Need a small information,. If i run two times only then it is working. Have seen .

0 Kudos

Thanks for your help. P. Bhagaban

It's working fine. Your suggestions is helpful to me.

0 Kudos

May be My code is Useful to some body.

My requirement: Need to reset the Purchase indent release strategy, Like Release to Un release is my Requirement.

CALL FUNCTION 'BAPI_REQUISITION_RESET_RELEASE'

       EXPORTING

         NUMBER                   = WA_FINAL-NUMBER

         ITEM                     = WA_FINAL-ITEM

         REL_CODE                 = WA_FINAL-REL_CODE

         USE_EXCEPTIONS           = 'X'

         NO_COMMIT_WORK           = ' '

       TABLES

         RETURN                   = RETURN

       EXCEPTIONS

         AUTHORITY_CHECK_FAIL     = 1

         REQUISITION_NOT_FOUND    = 2

         ENQUEUE_FAIL             = 3

         PREREQUISITE_FAIL        = 4

         RELEASE_ALREADY_POSTED   = 5

         RESPONSIBILITY_FAIL      = 6

         NO_RELEASE_ALREADY       = 7

         NO_NEW_RELEASE_INDICATOR = 8

         OTHERS                   = 9.

     IF SY-SUBRC <> 0.

     ENDIF.