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_QUOTATION_CREATEFROMDATA2 how to set release status

Former Member
0 Likes
1,291

I am creating quotation with above BAPI from java code. Everything is working fine except RELEASE status, i don't know how to set quotation status as released so that sales order can be created in this quotation. Please see attached image for more details.

1 ACCEPTED SOLUTION
Read only

former_member217544
Active Contributor
0 Likes
1,096

Hi,

Try with this function module STATUS_CHANGE_EXTERN.

Regards,

Swarna

6 REPLIES 6
Read only

former_member217544
Active Contributor
0 Likes
1,097

Hi,

Try with this function module STATUS_CHANGE_EXTERN.

Regards,

Swarna

Read only

0 Likes
1,096

Thanks Swarna,

it is not remote enabled and I need to call code from external java class(using JCO).

regards

Brijesh Singh

Read only

0 Likes
1,096

Hi,

You can create a new RFC and call this FM inside your new Z-RFC

Regards,

Swarna

Read only

0 Likes
1,096

Thanks a lot. That is exactly what I was thinking.

Regards

Brijesh Singh

Read only

0 Likes
1,096

Dear Swarna,

Need one more help. There is a Text tab in Item Details, how to specify text which displayed under Text tab. Thanks in advance.

Regards

Brijesh Singh

Read only

Former Member
0 Likes
1,096

Hi Brijesh,

Check below Sample Code .

DATA: OBJNR LIKE JSTO-OBJNR.

      OBJNR = 'VB'.

      OBJNR+2 = VBAK-VBELN.

      OBJNR+12 = '000000'.

**************************************************************************

  *  for USER_STATUS   use this SAP T-Table " TJ30" . **

***************************************************************************

  CALL FUNCTION 'STATUS_CHANGE_EXTERN'

           EXPORTING

                CHECK_ONLY            = ' '

                CLIENT                       = SY-MANDT

                OBJNR                       = OBJNR

                USER_STATUS          = USER_STATUS

                SET_INACT                = ' '

           EXCEPTIONS

                OBJECT_NOT_FOUND    = 1

                STATUS_INCONSISTENT = 2

                STATUS_NOT_ALLOWED  = 3

                OTHERS              = 4.

      CASE SY-SUBRC.

        WHEN 0.

          COMMIT WORK.

        WHEN 1.

          ROLLBACK WORK.

        WHEN 2.

          ROLLBACK WORK.

        WHEN 3.

          ROLLBACK WORK.

      ENDCASE.

Regard's

Smruti