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

Update - Problem for Purchasing Doc item

Former Member
0 Likes
1,066

Hi all,

I Have a problem for Update syntax.

please see code below:

            UPDATE ekpo
             SET:   oic_oland1   = wa_xekpo-oic_oland1   "Country
                    oic_oregio   = wa_xekpo-oic_oregio   "Region
                    umren        = wa_xekpo-umren.       "QTY conversion

Using this the table for EKPO should be updated but it did not..
did i miss something here.. for me to update directly on EKPO..

Thanks in advance..

Well appreciated your response..

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
972

Hi beginners,

NEVER ( means N E V E R) update a SAP standard table other than using Functions module, BAPIs, BaDi, Transaction provided by SAP.

Or ask the business revision department first 🙂

Regards

Clemens

7 REPLIES 7
Read only

Former Member
0 Likes
972

u should mention the purchase order to be updated.Pls search in SCN before u post

Read only

0 Likes
972

Hello Karthik

I already did that specifying the Purchase order item.

But it same it did not update the EKPO..

actually the code i paste is it takes time to update the EKPO...

Read only

0 Likes
972

ABAPER SAP wrote:

actually the code i paste is it takes time to update the EKPO...

Probably because the code you have posted will try to update every record in EKPO. But when it dumped, fortunately it rolled back your attempt to change it.

Clemens Li was right - don't do this.

Rob

Read only

Former Member
0 Likes
972

Hi,

Try this,

CALL FUNCTION 'ENQUEUE_E_TABLE'
   EXPORTING
     MODE_RSTABLE   = 'E'
     TABNAME        = 'EKPO'
   EXCEPTIONS
     FOREIGN_LOCK   = 1
     SYSTEM_FAILURE = 2
     OTHERS         = 3.

UPDATE EKPO SET BUKRS = '1000'
                               LOEKZ = 'X'
                               STATU = 'F'
           WHERE EBELN EQ '45000001'
           AND   EBELP EQ '0010'.

CALL FUNCTION 'DEQUEUE_E_TABLE'
   EXPORTING
     MODE_RSTABLE = 'E'
     TABNAME      = 'EKPO'.

Regards,

Danish

Read only

Clemenss
Active Contributor
0 Likes
973

Hi beginners,

NEVER ( means N E V E R) update a SAP standard table other than using Functions module, BAPIs, BaDi, Transaction provided by SAP.

Or ask the business revision department first 🙂

Regards

Clemens

Read only

RaymondGiuseppi
Active Contributor
0 Likes
972

Never

- use UPDATE SET without WHERE clause

- update a standard table with open sql (or use an update task FM)

I don't have access to an IS-OIL system, but you should look for BAPI* structures using the data element of the fields you want to update, and then look for BAPI using those structures. If not found look, via transaction BAPI, for a generic BAPI on purchase orders with an EXTENSIONIN parameter.

Regards,

Raymond

Read only

Former Member
0 Likes
972

Hello ALL,

Thanks for all the response..

I already configure the logic.. and not it is working..

Question answered..
I need to use update syntax.. cause the FM did not automatic update my Purc. Doc item..
to update direct the table automativ upon execution.. i also use WAIT syntax.