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 task

govind_parmar
Participant
0 Likes
5,189

Hi experts,

I tried using CALL FUNCTION xxx IN UPDATE TASK in a program,after before COMMIT the program reaches to this statement and as per the SAP it should get registered in VBLOG table but when I checked VBLOG table there wasn't any entry in this table.

Is there any reason why the entry isn't in the table??

Thanks

17 REPLIES 17
Read only

Pawan_Kesari
Active Contributor
0 Likes
2,993

In some systems VBLOG cluster table is implemented as transparent tables VBHDR, VBMOD, VBDATA and VBERROR. Check these table if they have values?

Read only

0 Likes
2,993

I can see entries in table VBMOD, VBDATA before the COMMIT and in VBHDR after COMMIT, but there isn't any entries that gets created in VBLOG.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,993

Does your FM update any database table ?

Regards,

Raymond

Read only

Former Member
0 Likes
2,993

First u confused me with after before commit

well you can any function module that is a update FM in CALL FUNCTION 'FM' IN UPDATE TASK, but they should not be called after COMMIT... u got to call them before teh COMMIT WORK stmnt.

once teh LUW is complete right, then if it is a V1 update a update prog will run and that will execute all these update FMs similiarly if it is V2 update it shall wait for the prog to reach COMMIT work then successful completion of V1 updates and then V2 is run.

Read only

Former Member
0 Likes
2,993

Hi g p

       1st debug your code in update debugging mode. after immediate execution of commit work, go to vbhdr. you can see an entry for update request. vbmod vbdata vberror filled by call fm in update task....after successful update process all entry which was created in vbdata, vbmod, vbhdr will be delete. if update was not successful then all recods remains in these table............

hope it will be helpful to solve your problem...

Thanks

Sabyasachi

Read only

Anurag_Abbi
Participant
0 Likes
2,993

Hi,

Please check the following:

1) Are you altering (modifying or creating) an entry in a Database table ?

   If no, then VBLOG will not contain any entry. Make sure that the database table

   (if user created) already exists. Make sure it is not locked by any other process.

   Make sure you have authorization to update the table you are altering.

2) If there was no error in updating the database table then you will find no entries in

   VBLOG table.

3) CALL FUNCTION … IN UPDATE TASK is used only in asynchronous update or local update.

4) Concept: When the program encounters CALL FUNCTION … IN UPDATE TASK(if it is in a sub routine then process is different but that I suppose is not the case here) , it

   will write an entry in VBLOG table. After the program is finished, the

   commit work statement forces the current dialog work process to trigger

   an update work process. It is now that the entries from VBLOG table are

   read and executed. If the database reports no errors then entries from VBLOG are deleted.

   However, if there was an error then a ROLL Back is performed and the entry in VBLOG

   are retained and flagged as error followed by an SAPmail to the user.

 

5) Alternatively you could also try running any other transaction, which you are authorized to,

    and deliberately insert an error so that the database commit does not take place and then

    check VBLOG table to verify. I do not think any SAP note has mentioned about an error

    in this functionality but you could try.

Could you please check your function as well. Make sure Process Type property is

appropriately set. In SE37 Goto >> Administration.

If there was an update problem the please have a look at

Tools >> Administration >> Monitoring >> Update

In case you found your solution in the above points then could you please mention

in which point and/or how.

In case you still did not find a solution then could you please let me know

the code with the following info.

a) Process type set for the Function. If possible the function code as well.

b) Database table name that you are updating with number of entries in the database table that already exist.

Regards

Anurag

Read only

Former Member
0 Likes
2,993

Hi G P,

              Please check this Note : 21495 - Transparent update tables...

Note : Check point Number # 2 , 4 ....

         "

2. Make sure all update requests have been processed and table VBLOG is empty. You can do so either directly with database means (ORACLE: "sqlplus", ADABAS-D: "xquery", DB2/400: "strsql" or "sqltool", MSSQL: "isql/w", DB2forAIX: "db2") with the Statement "SELECT COUNT(*) FROM VBLOG" or write and execute the following small ABAP/4-Program:

PROGRAM progname.

DATA: CNT TYPE I.

EXEC SQL. SELECT COUNT(*) FROM VBLOG INTO :CNT

ENDEXEC.

WRITE: CNT.

When VBLOG is empty, proceed with point 4), otherwise carry out point 3) first.

Regard's

Smruti

Read only

govind_parmar
Participant
0 Likes
2,993

Thanks guys for all your reply.

During the V1, V2 update  I want to see the entries in VBLOG, I can see the entries in VBDATA, VHDR etc. but not in VBLOG

As per the SAP documentation once the control comes to CALL FUNCTION 'FM' IN UPDATE it should create an entry in VBLOG which means it gets registered.(I debugged at this point and tried to see the table but couldnt find anything) After the COMMIT statement the system looks into VBLOG table and executes the V1 and V2 respectively.

So the thing is I cannot see any entry in VBLOG.  Is there any reason for the table not getting populated.

Read only

0 Likes
2,993

Try to execute some standard transactions and check content of VBLOG. Also read this other discussion : problem in table cluster.

Regards,

Raymond

Read only

0 Likes
2,993

The tried using the standard transaction but no use, the table VBLOG is simply empty.

Read only

0 Likes
2,993

So in your version this table is no longer used, check VBHDR, VBDATA, VBMOD  and VBERROR.

The documentation is not updated, and as i post in other discussion, SAP seems to use VBLOG as a generic name and no longer as the actual database table.

We use the term VBLOG in the reminder of this section for either implementation of the update queue.

Regards,

Raymond

Read only

0 Likes
2,993

ABAP Keyword documentation for ABAP 702 mentions VBHDR,

Call Function - Update Task

The function module is not executed immediately, but is scheduled for execution in a special work process (update work process). To do this, the name of the function module and the actual parameters passed are saved to the database tables VBMOD and VBDATA, which are managed by VBHDR. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.

Btw, why do you need to see entries in VBLOG?

Regards,
Naimesh Patel

Read only

0 Likes
2,993

Yes they started to update the documentation, but not yet completed, read again your link on 702 doc

The function module is not executed immediately, but is scheduled for execution in a special work process (update work process). To do this, the name of the function module and the actual parameters passed are saved to the database tables VBMOD and VBDATA, which are managed by VBHDR. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.

(...)

The actual execution is triggered by the statement COMMIT WORK. The formal parameters of the function module receive the values of the actual parameters from the database table VBLOG. <- VBLOG is back

Regards,

Raymond

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,993

Yes they started to update the documentation, but not yet completed, read again your link on 702 doc

I suppose it's WIP then. I can still see VBLOG making the guest appearance in 731 documentation

http://help.sap.com/abapdocu_731/en/abapcall_function_update.htm

Classic SAP!

Read only

0 Likes
2,993

I found it, it' s a translation problem, check documentation in german, no more VBLOG but VBDATA, and for several versions

Die tatsächliche Ausführung wird durch die Anweisung COMMIT WORK angestoßen. Die Formalparameter des Funktionsbausteins bekommen die Werte der Aktualparameter aus der Datenbanktabelle VBDATA übergeben.

Regards,

Raymond

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,993

Eureka! Eureka! Eureka!

Read only

0 Likes
2,993

I guess, there are using some software to convert, instead of any human translating it

I did noticed VBLOG, but to clear up some confusion, I only shown the relevant part ...

Regards,
Naimesh Patel