Service objects in recording SHDB and BDC
Hi Experts,
I have some problem when create recording or BDC. Service object icon is not displayed when i create recording or using BDC to call some transaction.
Is there any idea, so when i create recording or call transaction using BDC, service obect icon can be displayed.
Thank you for your help.
Best Regards,
Subandi Widjaya
[GOS|http://help-abap.zevolving.com/category/generic-object-services-gos/] - Generic Services Objects - wont be available in any Create Transaction like XD01, VA01 etc. The reason is when you are creating a new document/object, the Number is not yet assigned to that Business Object. Thus, you can't see the GOS toolbar even without SHDB.
It won't be a clever idea to try to add create GOS objects as part of the BDC. You should create two step process:
1. BDC to either create / change any document / object
2. Use GOS FMs / methods to create the GOS objects for that documents.
Regards,
Naimesh Patel
Similar Messages
-
Hello. We'd like to be able to determine when a TOOL service object
starts up from within another TOOL service object. I understand the
problems with service object start up ordering, but I'll summarize
them here:
1. You can't reference a service object until it's up
2. You can't guarantee a service object to be up unless
a) it's a non-TOOL SO (DB Resource Manager or DB Session)
b) it's a TOOL SO in another partition which is numerically lower
than yours
According to Forte support, we should put our dependant service objects in
different partitions and use the numerical startup to get them going. For
example, if SO A depends on SO B, we need SO B in partition 1 and SO A in
partition 2. Also, if we have A depends on B and nobody else uses B, we
should probably use A as an umbrella for B.
But what if we don't want to do this? What if we don't want to take the
performance hit from the partitioning? What if we've got multiple
client-visible SOs that interact? We tried this scheme:
in A.Init():
super.Init()
start task Startup()
in A.Startup():
while B_SO = NIL do
task.part.operatingsystem.sleep(SPIN_TIME);
end while;
// now do stuff with B_SO
self.Ready = TRUE; // users can test this to see if A_SO is ready
The above works sporadically. According to support, that's because
testing the NIL reference isn't like testing for NIL on a normal object,
the name service is involved and that can screw things up.
Anybody have something that works? This seems to be a really stupid
feature of the system.
========================================================================
Neil Gendzwill, Senior Software Engineer, SED Systems, Saskatoon, Canada
E-MAIL: [email protected] PHONE: (306) 933-1571 FAX: (306) 933-1486
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Neil-
The reason your scheme fails occasionally (I'm pretty sure) is the
"start task" in the init method.. The only thing you are guaranteed by
partition order, etc, is that the "init" methods are executed (i.e. the
objects are instantiated) in the order you want. If you start
asynchronous tasks from within the init method, all bets are off as to
whether the spun-off asynchronous task will get done before the next
service object init() is called or even before the first client is
allowed to come on line.. All depends on the thread switching, which of
course cannot be predicted or counted on (hence the term "thread-safe
code").
I use something similar to the subsequent writer on the thread (Mark
Sundsten) except that service objects which need other objects (like
services requiring DB session brokers) go through a multi-step process
waiting for the broker to be up and truly ready for business:
Keep testing for a legal reference to the broker until it is non-NIL
and no exception
Post an "areyoualive" event on the broker with suitable
retry/error-handling until positive response
The broker, of course, does the start task startup() sort of thing in
its init method, the final step of which is to begin responding to
"areyoualive" events with the proper response.
The final trick is that no services on the service object work (they
block/wait) until the object has successfully started (including the
wait for the broker). This is to avoid client requests from being
processed before the service is ready.
With this technique, you can put service objects and their brokers
wherever you want to. I wish it was simpler, but when you enter the
world of multiple threads you need to carefully plan your startup
behavior and bullet-proof all code to be thread safe.
I've also seen techniques where the first actual service request
performs a startup if it hasn't been done already. Sort of the "lazy
instantiation" of service-object startups.. Problem is, of course, that
for the reason outlined above the first client can come alive and begin
asking for things from the services before asynchronous tasks started in
the init methods are done. If you go this direction, make sure you
understand this nuance and have no ansych startups occurring in init
methods.
Hope this helps.
-Greg
-----Original Message-----
From: Neil Gendzwill [SMTP:[email protected]]
Sent: Friday, June 19, 1998 12:48 PM
To: Users, Forte
Subject: Service object start-up
Hello. We'd like to be able to determine when a TOOL service
object
starts up from within another TOOL service object. I understand
the
problems with service object start up ordering, but I'll
summarize
them here:
1. You can't reference a service object until it's up
2. You can't guarantee a service object to be up unless
a) it's a non-TOOL SO (DB Resource Manager or DB Session)
b) it's a TOOL SO in another partition which is numerically
lower
than yours
According to Forte support, we should put our dependant service
objects in
different partitions and use the numerical startup to get them
going. For
example, if SO A depends on SO B, we need SO B in partition 1
and SO A in
partition 2. Also, if we have A depends on B and nobody else
uses B, we
should probably use A as an umbrella for B.
But what if we don't want to do this? What if we don't want to
take the
performance hit from the partitioning? What if we've got
multiple
client-visible SOs that interact? We tried this scheme:
in A.Init():
super.Init()
start task Startup()
in A.Startup():
while B_SO = NIL do
task.part.operatingsystem.sleep(SPIN_TIME);
end while;
// now do stuff with B_SO
self.Ready = TRUE; // users can test this to see if A_SO is
ready
The above works sporadically. According to support, that's
because
testing the NIL reference isn't like testing for NIL on a normal
object,
the name service is involved and that can screw things up.
Anybody have something that works? This seems to be a really
stupid
feature of the system.
========================================================================
Neil Gendzwill, Senior Software Engineer, SED Systems,
Saskatoon, Canada
E-MAIL: [email protected] PHONE: (306) 933-1571 FAX: (306)
933-1486
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
[REQ] Service Objects "binding" methodology
Hi,
When we program in express, the resulting service objects offering 'business model', and the one offering database accesses
seem to be bound together.
The BMServiceSO and the BMDBSO are bound together.
Forté prevents you from moving the BMDB, telling you that it's linked to BMServiceSO.
When you move BMServiceSO or you tag it as referenced SO, it takes the BMDBSo with it.
How to do this manually with TOOL code ?
Thanks for any suggestion,
J-Paul GABRIELLI
Software builder.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Hi,
When we program in express, the resulting service objects offering 'business model', and the one offering database accesses
seem to be bound together.
The BMServiceSO and the BMDBSO are bound together.
Forté prevents you from moving the BMDB, telling you that it's linked to BMServiceSO.
When you move BMServiceSO or you tag it as referenced SO, it takes the BMDBSo with it.
How to do this manually with TOOL code ?
Thanks for any suggestion,
J-Paul GABRIELLI
Software builder.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
CSM service-object groups.
Hello,
I have a question. I'd like to maintain an ehanced service object group. When I create a service-object, it splits the service-object
into
sobjname.tcp
and then
sobjname.udp
But it doesn't tell you its going to do this until you deploy ( very annoying ).
How can I create an enhanced service-object group with the protocol & port objects. I have both CSM 3.3. and 4.1.
Also is there an UNDO command that I don't know about when modifying (cutting and pasting access rules around in CSM).?
Thanks!
-M-Hello Bobby,
The object-groups look good,
The way to use them will be with ACLs so config looks cleanear and smaller,
Regards,
Julio Carvajal -
RE: Re[2]: Service Object events and LockMgr
I think there are a lot to implement a lock manager. If several objects
should be updated in one transaction, the lock manager should be able to
handle rollbacks. Other things like release lock when exception happens,
avoiding dead locks, etc. Most of the features are provided by DBMS, so
I think using a option 2 would be a better solution.
-----Original Message-----
From: Dimitar Gospodinov [mailto:[email protected]]
Sent: Wednesday, July 28, 1999 2:44 PM
To: Peter Sham
Cc: Duncan Kinnear; [email protected]
Subject: Re[2]: Service Object events and LockMgr
Hello Peter,
Wednesday, July 28, 1999, 9:19:10 PM, you wrote:
PS> Hi,
PS> Just wonder exactly how this Lock Manager can be
implemented. Do you mean that you are
PS> going to cache every object that is instantiated from the
database? Or you just cache
PS> the object id, primary key, etc?
PS> Frankly speaking, I won't attempt to due with this kind
of currency coding myself as
PS> the database vendor has spent years in coding just to do this.
PS> Regards.
The second one - you just need some unique value that will identify
the object being locked. You should register with the Lock
Manager only
the objects that you want to lock.
For me, one of the goal of such pattern is to give you some freedom
from the specifics of the database lock mechanism.
Another benefit that I can see is that using such approach you can
always answer to the question: "Can I modify/delete this object?".
Best regards,
Dimitar mailto:[email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>I think there are a lot to implement a lock manager. If several objects
should be updated in one transaction, the lock manager should be able to
handle rollbacks. Other things like release lock when exception happens,
avoiding dead locks, etc. Most of the features are provided by DBMS, so
I think using a option 2 would be a better solution.
-----Original Message-----
From: Dimitar Gospodinov [mailto:[email protected]]
Sent: Wednesday, July 28, 1999 2:44 PM
To: Peter Sham
Cc: Duncan Kinnear; [email protected]
Subject: Re[2]: Service Object events and LockMgr
Hello Peter,
Wednesday, July 28, 1999, 9:19:10 PM, you wrote:
PS> Hi,
PS> Just wonder exactly how this Lock Manager can be
implemented. Do you mean that you are
PS> going to cache every object that is instantiated from the
database? Or you just cache
PS> the object id, primary key, etc?
PS> Frankly speaking, I won't attempt to due with this kind
of currency coding myself as
PS> the database vendor has spent years in coding just to do this.
PS> Regards.
The second one - you just need some unique value that will identify
the object being locked. You should register with the Lock
Manager only
the objects that you want to lock.
For me, one of the goal of such pattern is to give you some freedom
from the specifics of the database lock mechanism.
Another benefit that I can see is that using such approach you can
always answer to the question: "Can I modify/delete this object?".
Best regards,
Dimitar mailto:[email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte> -
Re: Service Object events and LockMgr
On the option that you have considered, I have implemented the same model
in my previous project (using Java/RMI), but I felt that it is more than
what is normally needed for concurrency protection.
I can suggest another option that is worth considering which is in place in
our app for concurrency.
Almost every table in our db has created By, created On, modifed By,
modified On columns. The parent class of all business objects has
attributes that correspond to these four columns. In addition to these
four, there is a fifth attribute (introduced when concurrency was built)
called originalModifiedOn. Upon retrieval from the db, it is set to
modifiedOn value (from the db), during UPDATE, the value in this column is
added part of the WHERE clause. So when the second user tried to do save
the same object, the underlying db update will get a 'zero rows updated'
which is translated into an application error 'possible concurrency
error'. The user re-retreives the now 'stale' object before applying their
edits.
A lot of these things are and can be built into the framework imposing very
little work that each Object needs to do to have concurrency protection.
I am not sure if there is a mention in the Patterns paper of this model,
but it is very easy to implement and supports what is needed.
Kishore Puvvada's Mail
[email protected] on 07/28/99 01:47:00 AM
To: [email protected]@INTERNET
cc: (bcc: Kishore Puvvada/HQ-IS/TAL)
Subject: Service Object events and LockMgr
Hi folks,
We're currently looking at strategies for dealing with the simultaneous
updates to the database from multiple clients (concurrency
management). That is when two (or more) clients load the same object to
edit it, then make different changes and save them to the database.
We have a copy of a Forté document (from the "Patterns" course, I
think) which describes three methods of dealing with this:
1) Lock the database table row as soon as a client select it for editing
and hold the lock until it is saved.
2) Immediately before 'saving' check that the database hasn't changed
(either by reading what's there before updating, or by using a huge
'where' clause that contains all unchanged fields)
3) The Forté "LockMgr" pattern, which uses a service object with notifier
proxies to allow locking and updating notification between the clients.
Option 3 is obviously the most robust method, but it requires a fair
amount of coding and could also be a bottleneck for database reads and
writes.
But I have another option for which I was looking for opinions. What if
we had a "Change Event manager" which broadcast an event every time
a change is made to the database. Each business class would have its
own event. If the event had the object's primary key as a parameter, then
clients editing that particular object type could check to see if the object
currently on screen is the one that changed. That way you could disable
the 'save' until they had refreshed their on-screen data.
It's not particularily elegant, but it's reasonably simple to implement. It
also deals with changes sent across our WAN from other database
servers.
But this option is only worthwhile if you can replicate the "Change Event
manager" SO and still register for an event on the client. Can clients
register for SO events and receive an event generated by any of the SO's
replicates? Or when you register for an SO's event do you register for
only one instance of the SO?
Thanks in advance for any answers.
Cheers,
Duncan Kinnear,
McCarthy and Associates, Email:
[email protected]
PO Box 764, McLean Towers, Phone: +64 6 834 3360
Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
Providing Integrated Software to the Meat Processing Industry for over 10
years
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:
http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>On the option that you have considered, I have implemented the same model
in my previous project (using Java/RMI), but I felt that it is more than
what is normally needed for concurrency protection.
I can suggest another option that is worth considering which is in place in
our app for concurrency.
Almost every table in our db has created By, created On, modifed By,
modified On columns. The parent class of all business objects has
attributes that correspond to these four columns. In addition to these
four, there is a fifth attribute (introduced when concurrency was built)
called originalModifiedOn. Upon retrieval from the db, it is set to
modifiedOn value (from the db), during UPDATE, the value in this column is
added part of the WHERE clause. So when the second user tried to do save
the same object, the underlying db update will get a 'zero rows updated'
which is translated into an application error 'possible concurrency
error'. The user re-retreives the now 'stale' object before applying their
edits.
A lot of these things are and can be built into the framework imposing very
little work that each Object needs to do to have concurrency protection.
I am not sure if there is a mention in the Patterns paper of this model,
but it is very easy to implement and supports what is needed.
Kishore Puvvada's Mail
[email protected] on 07/28/99 01:47:00 AM
To: [email protected]@INTERNET
cc: (bcc: Kishore Puvvada/HQ-IS/TAL)
Subject: Service Object events and LockMgr
Hi folks,
We're currently looking at strategies for dealing with the simultaneous
updates to the database from multiple clients (concurrency
management). That is when two (or more) clients load the same object to
edit it, then make different changes and save them to the database.
We have a copy of a Forté document (from the "Patterns" course, I
think) which describes three methods of dealing with this:
1) Lock the database table row as soon as a client select it for editing
and hold the lock until it is saved.
2) Immediately before 'saving' check that the database hasn't changed
(either by reading what's there before updating, or by using a huge
'where' clause that contains all unchanged fields)
3) The Forté "LockMgr" pattern, which uses a service object with notifier
proxies to allow locking and updating notification between the clients.
Option 3 is obviously the most robust method, but it requires a fair
amount of coding and could also be a bottleneck for database reads and
writes.
But I have another option for which I was looking for opinions. What if
we had a "Change Event manager" which broadcast an event every time
a change is made to the database. Each business class would have its
own event. If the event had the object's primary key as a parameter, then
clients editing that particular object type could check to see if the object
currently on screen is the one that changed. That way you could disable
the 'save' until they had refreshed their on-screen data.
It's not particularily elegant, but it's reasonably simple to implement. It
also deals with changes sent across our WAN from other database
servers.
But this option is only worthwhile if you can replicate the "Change Event
manager" SO and still register for an event on the client. Can clients
register for SO events and receive an event generated by any of the SO's
replicates? Or when you register for an SO's event do you register for
only one instance of the SO?
Thanks in advance for any answers.
Cheers,
Duncan Kinnear,
McCarthy and Associates, Email:
[email protected]
PO Box 764, McLean Towers, Phone: +64 6 834 3360
Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
Providing Integrated Software to the Meat Processing Industry for over 10
years
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:
http://pinehurst.sageit.com/listarchive/forte>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte> -
Service Object events and LockMgr
Hi folks,
We're currently looking at strategies for dealing with the simultaneous
updates to the database from multiple clients (concurrency
management). That is when two (or more) clients load the same object to
edit it, then make different changes and save them to the database.
We have a copy of a Forté document (from the "Patterns" course, I
think) which describes three methods of dealing with this:
1) Lock the database table row as soon as a client select it for editing
and hold the lock until it is saved.
2) Immediately before 'saving' check that the database hasn't changed
(either by reading what's there before updating, or by using a huge
'where' clause that contains all unchanged fields)
3) The Forté "LockMgr" pattern, which uses a service object with notifier
proxies to allow locking and updating notification between the clients.
Option 3 is obviously the most robust method, but it requires a fair
amount of coding and could also be a bottleneck for database reads and
writes.
But I have another option for which I was looking for opinions. What if
we had a "Change Event manager" which broadcast an event every time
a change is made to the database. Each business class would have its
own event. If the event had the object's primary key as a parameter, then
clients editing that particular object type could check to see if the object
currently on screen is the one that changed. That way you could disable
the 'save' until they had refreshed their on-screen data.
It's not particularily elegant, but it's reasonably simple to implement. It
also deals with changes sent across our WAN from other database
servers.
But this option is only worthwhile if you can replicate the "Change Event
manager" SO and still register for an event on the client. Can clients
register for SO events and receive an event generated by any of the SO's
replicates? Or when you register for an SO's event do you register for
only one instance of the SO?
Thanks in advance for any answers.
Cheers,
Duncan Kinnear,
McCarthy and Associates, Email: [email protected]
PO Box 764, McLean Towers, Phone: +64 6 834 3360
Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
Providing Integrated Software to the Meat Processing Industry for over 10 years
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>Hi,
Just wonder exactly how this Lock Manager can be implemented. Do you mean that you are
going to cache every object that is instantiated from the database? Or you just cache
the object id, primary key, etc?
Frankly speaking, I won't attempt to due with this kind of currency coding myself as
the database vendor has spent years in coding just to do this.
Regards.
Dimitar Gospodinov wrote:
Hello Duncan,
Wednesday, July 28, 1999, 10:31:46 AM, you wrote:
DK> Hi folks,
DK> We're currently looking at strategies for dealing with the simultaneous
DK> updates to the database from multiple clients (concurrency
DK> management). That is when two (or more) clients load the same object to
DK> edit it, then make different changes and save them to the database.
DK> We have a copy of a Forté document (from the "Patterns" course, I
DK> think) which describes three methods of dealing with this:
DK> 1) Lock the database table row as soon as a client select it for editing
DK> and hold the lock until it is saved.
DK> 2) Immediately before 'saving' check that the database hasn't changed
DK> (either by reading what's there before updating, or by using a huge
DK> 'where' clause that contains all unchanged fields)
DK> 3) The Forté "LockMgr" pattern, which uses a service object with notifier
DK> proxies to allow locking and updating notification between the clients.
DK> Option 3 is obviously the most robust method, but it requires a fair
DK> amount of coding and could also be a bottleneck for database reads and
DK> writes.
DK> But I have another option for which I was looking for opinions. What if
DK> we had a "Change Event manager" which broadcast an event every time
DK> a change is made to the database. Each business class would have its
DK> own event. If the event had the object's primary key as a parameter, then
DK> clients editing that particular object type could check to see if the object
DK> currently on screen is the one that changed. That way you could disable
DK> the 'save' until they had refreshed their on-screen data.
DK> It's not particularily elegant, but it's reasonably simple to implement. It
DK> also deals with changes sent across our WAN from other database
DK> servers.
DK> But this option is only worthwhile if you can replicate the "Change Event
DK> manager" SO and still register for an event on the client. Can clients
DK> register for SO events and receive an event generated by any of the SO's
DK> replicates? Or when you register for an SO's event do you register for
DK> only one instance of the SO?
DK> Thanks in advance for any answers.
DK> Cheers,
DK> Duncan Kinnear,
DK> McCarthy and Associates, Email: [email protected]
DK> PO Box 764, McLean Towers, Phone: +64 6 834 3360
DK> Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
DK> -------------------------------------------------------------------------------
DK> Providing Integrated Software to the Meat Processing Industry for over 10 years
DK> -
DK> To unsubscribe, email '[email protected]' with
DK> 'unsubscribe forte-users' as the body of the message.
DK> Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>
I would recommend you to use the following approach (of course if you
do not have some special requirements :) ):
1. You should have a LockManager that will synchronize all clients in
their attempt to modify/delete objects in your application.
2. Each client, when attempts to modify/delete some object, it must
LOCK it using the services provided with the LockManager.
3. The requested operation can be performed only after successful
locking.
4. If a lock can not be obtained (for example if the object is already
locked by some other client) then the operation is aborted.
The details of this pattern depends on your needs. :)
Hope this helps.
Best regards,
Dimitar mailto:[email protected]
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>-
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte> -
ITS iviews and services objects
Dear all,
I have a problem with an ITS iview : transaction ME23N
We have implemented the archive link to attach some numerical document on SAP object.
When I go directly in ME23N in SAPgui, I can click on Services objects button, then Store business document, then I choose a document type. A frontend windows is opened to allow us to select a local file on my computer and archive it.
When I jump in ME23N through the iview portal, I can click on Services objects then Store business document, but then I can see the document type but I can't select it.
Can someone help me please ? is it possible to use this functionnality and how ?
Thanks
Kind regards
VéroniqueEliz,
iviews are Portal content objects in portal where as Services are maintained in the backend system.
services are used in HomePage Framework .basically service holds a resource that points to a PCD location in portal.By using this we can reorgananise the ESS and MSS in portal
check this blog
Rapid Portal Content Creation using the Homepage Framework
go to SPRO-cross application components - HomePage framework --- Headers,Services etc
Thanks
Bala Duvvuri -
Help in using record type and object type
Hi Experts,
I am new to object types and record types.
I want to return the output of this query using one OUT parameter
from the procedure using RECORD type or OBJECT type.
with out using refcursor.
SELECT empno,ename,sal FROM emp WHERE deptno=30;
Let us assume the query is returning 50 records.
I want to send those 50 records to OUT parameter using record type or object type.
Please provide the for the requirement code using RECORD TYPE and OBJECT TYPE separately.
Your earliest response is appreciated.
Thanks in advance.Hi All,
I have tried this.But it ising not work
CREATE OR REPLACE PACKAGE maultiplevalues_pkg
IS
TYPE t_record IS RECORD
(empno emp.empno%TYPE,
ename emp.ename%TYPE,
sal emp.sal%TYPE);
V_RECORD t_record;
TYPE t_type IS TABLE OF V_RECORD%TYPE;
PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
dept_result OUT t_type);
END;
CREATE OR REPLACE PACKAGE body maultiplevalues_pkg
IS
PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
dept_result OUT t_type)
is
begin
dept_result :=t_type();
for I in(
select EMPNO,ENAME,SAL from EMP WHERE deptno=p_deptno
LOOP
dept_result.extend;
dept_result(i).empno :=i.empno;
dept_result(i).ename :=i.ename;
dept_result(i).sal :=i.sal;
END LOOP;
END;
END;
Please help me OUT return multiple values through single OUT variable in a procedure.
Thanks. -
Service Tax Condition record - Table-3 and access sequence MWST
Dear All,
For maintaining the service tax conditon record , it is required to have the condition record to maintain under Tax classification table, which is available in access sequence MWST or we can add this condition table( table no :3) in any other access sequence and that access sequence needs to be assigned in Service tax condition type i.e JSRT, becasue system will check the rates from the table A003 while doing the service tax transfer from intermediate account to service tax account in report RFUMSV50.
But the issue in there is NO validity period defined in the condition table : 3 , which signifies that we can not maintain the service tax condition record along with the validity period.
Is there any way , we can add validity period field in Tax classification table.
and how can we see the maintainace of Taxes table , is there any T.code avaiable for the same, as I could't find the same.\
Please suggest.
Thanks & Regards
NitinHi Nitin,
SD can give validity period for a tax code either for an individual customer or for all the customers through their pricing conditions.
Aravind -
Mass maintenance and BDC Recodring of custom fields added in PO header.
Hello Experts,
I have created a custom fields in PO header and used Structure for BADI implementation to update the header with values enterd in custom table.
My requirement is for some selected PO i want to fix the value of one of my custom field at header level.
I have tried both the options Mass maintenance and BDC recording but the issue i'm facing is when i go for mass maintenance it is giving me the ERROR and it seems that we can only do the mass maintenance for sap-standard fields only.
When i go for BDC recording i'm facing the issue that when i do SHDB and start recording for ME22N my custom field is coming grayed out and i'm not able to input the desired value in custom field and complete my recording.
Let me know your valuable inputs .
Thanks,
NaveenHello,
Instead of BDC i'm doing it through the BAPI "BAPI_PO_CHANGE" by populating the structure extensionin but here i'm facing the error as below:-
W ME 887 Error transferring ExtensionIn data for enhancement CI_EKKODB
E BAPI 003 Instance 4500001544 of object type PurchaseOrder could not be changed
below is my code:-
ls_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
ls_extensionin-valuepart1+0(10) = wa_po-ebeln.
ls_extensionin-valuepart1+14(3) = no.
append ls_extensionin to lt_extensionin.
clear:ls_bapi_te_bg,ls_extensionin.
ls_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
ls_extensionin-valuepart1+0(10) = wa_po-ebeln.
ls_extensionin-valuepart1+10(1) = 'X'.
append ls_extensionin to lt_extensionin.
clear:ls_bapi_te_bg,ls_extensionin.
call function 'BAPI_PO_CHANGE'
exporting
purchaseorder = wa_po-ebeln
tables
return = it_bapireturn
extensionin = lt_extensionin
if it_bapireturn[] is initial.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = ' '
importing
return = it_bapireturn.
endif.
refresh lt_extensionin[].
endloop.
Please let me know if there is any way to achieve this.
Thanks,
naveen -
What is BAPI?How to create a BAPI? Difference b/w BAPI and BDC
Hi all,
Can some one help me regarding...
What is an BAPI?where it is used?
How to create a BAPI?
What is the difference between BAPI and BDC Program?
Iam in Initial stage regarding BAPI concept.
Please respond me soon.
Thanks,
LeeHI,
Here it is:
BAPI Programming Guide
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
BAPI User Guide
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://ifr.sap.com/catalog/query.asp
STEP BY STEP for BAPI
http://sap-img.com/abap/bapi-step-by-step-guidance.htm
<b>DIFFERENCE between BAPI and BDC</b>
BDC is traditional way of coding the transactions for uploading the legacy data, Sap is changing all transactions to Object oriented programming. Since BAPI is Object based and supports all the new transactions it is preffered over BDC. More over BAPI's process data faster than BDC.
BAPI is a SAP-supplied function module with a defined interface, which allows you to interact with various business objects. SAP guarantees the integrity of your database for anything updated using a BAPI. BDC is a method of driving screens programatically, for updating SAP data. BAPIs are generally faster than BDCs.
A BAPI is faster because it is updating the DB "directly". Whereas BDC with call
transaction goes through the whole screen sequence like any user would do, simply put, fills screens.
However - there is not always a BAPI for a particular transaction and not all functions that are performed by a transaction can be done by a BAPI. BDCs produce error sessions which can be processed by the user, while BAPIs don't.
First choose the BAPI ,if there is no BAPI go for BDC.
why BAPI first not BDC.
SAP comes up with Change in Version, so each and every time they will change the screens/number etc.
so you have to change your BDC programs accordingly.
and also Most of the Latest versions transactions are Enjoy Transaction. they will not support BDC's in Background.
But Using BAPI's No such disadvantages.
A BAPI is faster because it is updating the DB "directly" through ABAP code.
A BDC with call transaction goes through the whole screen sequence like any user would do, simply put, it is filling screens.
Actually it depends on your requirement but BAPI is more effective as it is standard function module to update SAP databases rather than BDC.
using bdc over bapi has advantages and also disadvantages
advantages:
1. using bdc we can upload data into database tables using 2 ways
1. foreground -
means that user interaction is there for each and every record.
2. back ground -
no user interaction and tasks are done automatically.
using these two options is one of the greatest advantage over bapi.
2. in bdc call transaction method we can control the display of screen resolution which is not possible with bapi's
3. bdc is generally used for transferring of large amount of data than bapi's
4.session method of bdc allows us to place data directly in application server and then finally transfered into sap database tables
disadvantages:
1.bdc is only used for sap to sap system data transferring
2. bapis's generally works more faster than bdc's
3. using bapis we can connect to remote systems and also to non sap systems.
if useful reward some points.
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
with each other at the Business Object / Process level.
Check this link to know more about BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling & logging features. .
To know more about BDC,
check the link.
http://sappoint.com/abap/
Main differences are...
In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
not only that...
when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
<b><REMOVED BY MODERATOR></b>
Manish
Message was edited by:
Alvaro Tejada Galindo -
Uploading info records by using BDC
Hi all,
Does any one having knowledge in uploading info records (ME11) by using BDC.
Problem arises when going for multiple scales.
Can any one let me know how proceed this BDC.
Regards,
RajGoto transaction SHBD enter a recording name and specify the transaction code.
Enter the test data and save it , it will actomatically create a bdc program.
now select that recording name and click create program icon and specify the program name.
This is the program which was created using transaction SHDB for XD01.
include bdcrecx1.
parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: KUN16
KUNNR_001(016),
data element: BUKRS
BUKRS_002(004),
data element: VKORG
VKORG_003(004),
data element: VTWEG
VTWEG_004(002),
data element: SPART
SPART_005(002),
data element: KTOKD
KTOKD_006(004),
data element: ANRED
ANRED_007(015),
data element: NAME1_GP
NAME1_008(035),
data element: SORTL
SORTL_009(010),
data element: NAME2_GP
NAME2_010(035),
data element: STRAS_GP
STRAS_011(035),
data element: PFACH
PFACH_012(010),
data element: ORT01_GP
ORT01_013(035),
data element: PSTLZ
PSTLZ_014(010),
data element: ORT02_GP
ORT02_015(035),
data element: PFORT_GP
PFORT_016(035),
data element: PSTL2
PSTL2_017(010),
data element: LAND1_GP
LAND1_018(003),
data element: REGIO
REGIO_019(003),
data element: SPRAS
SPRAS_020(002),
data element: TELX1
TELX1_021(030),
data element: TELF1
TELF1_022(016),
data element: TELFX
TELFX_023(031),
data element: TELF2
TELF2_024(016),
data element: TELTX
TELTX_025(030),
data element: TELBX
TELBX_026(015),
data element: URL
KNURL_027(132),
data element: STCD1
STCD1_028(016),
data element: STCD2
STCD2_029(011),
data element: BBBNR
BBBNR_030(007),
data element: BBSNR
BBSNR_031(005),
data element: BUBKZ
BUBKZ_032(001),
data element: BRSCH
BRSCH_033(004),
data element: LZONE
LZONE_034(010),
data element: KUKLA
KUKLA_035(002),
data element: BRSCH
BRSCH_036(004),
data element: UMSA1
UMSA1_037(020),
data element: UWAER
UWAER_038(005),
data element: UMJAH
UMJAH_039(004),
data element: JMZAH
JMZAH_040(006),
data element: JMJAH
JMJAH_041(004),
data element: BANKS
BANKS_01_042(003),
data element: BANKK
BANKL_01_043(015),
data element: BANKN
BANKN_01_044(018),
data element: ABLAD
ABLAD_01_045(025),
data element: KNKAL
KNFAK_01_046(002),
data element: CIVVE
CIVVE_047(001),
data element: ANRED_AP
ANRED_01_048(030),
data element: ANRED_AP
ANRED_02_049(030),
data element: NAMEV_VP
NAMEV_01_050(035),
data element: NAMEV_VP
NAMEV_02_051(035),
data element: NAME1_GP
NAME1_01_052(035),
data element: NAME1_GP
NAME1_02_053(035),
data element: TELF1
TELF1_01_054(016),
data element: TELF1
TELF1_02_055(016),
data element: ABTNR_PA
ABTNR_01_056(004),
data element: ABTNR_PA
ABTNR_02_057(004),
data element: AKONT
AKONT_058(010),
data element: DZTERM
ZTERM_059(004),
data element: MAHNA
MAHNA_060(004),
data element: BZIRK
BZIRK_061(006),
data element: AWAHR
AWAHR_062(003),
data element: WAERS_V02D
WAERS_063(005),
data element: KALKS
KALKS_064(001),
data element: LPRIO
LPRIO_065(002),
data element: KZAZU_D
KZAZU_066(001),
data element: ANTLF
ANTLF_067(001),
data element: PERFK
PERFK_068(002),
end of record.
End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMF02D' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
record-KUNNR_001.
perform bdc_field using 'RF02D-BUKRS'
record-BUKRS_002.
perform bdc_field using 'RF02D-VKORG'
record-VKORG_003.
perform bdc_field using 'RF02D-VTWEG'
record-VTWEG_004.
perform bdc_field using 'RF02D-SPART'
record-SPART_005.
perform bdc_field using 'RF02D-KTOKD'
record-KTOKD_006.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-KNURL'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-ANRED'
record-ANRED_007.
perform bdc_field using 'KNA1-NAME1'
record-NAME1_008.
perform bdc_field using 'KNA1-SORTL'
record-SORTL_009.
perform bdc_field using 'KNA1-NAME2'
record-NAME2_010.
perform bdc_field using 'KNA1-STRAS'
record-STRAS_011.
perform bdc_field using 'KNA1-PFACH'
record-PFACH_012.
perform bdc_field using 'KNA1-ORT01'
record-ORT01_013.
perform bdc_field using 'KNA1-PSTLZ'
record-PSTLZ_014.
perform bdc_field using 'KNA1-ORT02'
record-ORT02_015.
perform bdc_field using 'KNA1-PFORT'
record-PFORT_016.
perform bdc_field using 'KNA1-PSTL2'
record-PSTL2_017.
perform bdc_field using 'KNA1-LAND1'
record-LAND1_018.
perform bdc_field using 'KNA1-REGIO'
record-REGIO_019.
perform bdc_field using 'KNA1-SPRAS'
record-SPRAS_020.
perform bdc_field using 'KNA1-TELX1'
record-TELX1_021.
perform bdc_field using 'KNA1-TELF1'
record-TELF1_022.
perform bdc_field using 'KNA1-TELFX'
record-TELFX_023.
perform bdc_field using 'KNA1-TELF2'
record-TELF2_024.
perform bdc_field using 'KNA1-TELTX'
record-TELTX_025.
perform bdc_field using 'KNA1-TELBX'
record-TELBX_026.
perform bdc_field using 'KNA1-KNURL'
record-KNURL_027.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LZONE'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-STCD1'
record-STCD1_028.
perform bdc_field using 'KNA1-STCD2'
record-STCD2_029.
perform bdc_field using 'KNA1-BBBNR'
record-BBBNR_030.
perform bdc_field using 'KNA1-BBSNR'
record-BBSNR_031.
perform bdc_field using 'KNA1-BUBKZ'
record-BUBKZ_032.
perform bdc_field using 'KNA1-BRSCH'
record-BRSCH_033.
perform bdc_field using 'KNA1-LZONE'
record-LZONE_034.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-JMJAH'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-KUKLA'
record-KUKLA_035.
perform bdc_field using 'KNA1-BRSCH'
record-BRSCH_036.
perform bdc_field using 'KNA1-UMSA1'
record-UMSA1_037.
perform bdc_field using 'KNA1-UWAER'
record-UWAER_038.
perform bdc_field using 'KNA1-UMJAH'
record-UMJAH_039.
perform bdc_field using 'KNA1-JMZAH'
record-JMZAH_040.
perform bdc_field using 'KNA1-JMJAH'
record-JMJAH_041.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKN(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNBK-BANKS(01)'
record-BANKS_01_042.
perform bdc_field using 'KNBK-BANKL(01)'
record-BANKL_01_043.
perform bdc_field using 'KNBK-BANKN(01)'
record-BANKN_01_044.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'KNVA-KNFAK(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNVA-ABLAD(01)'
record-ABLAD_01_045.
perform bdc_field using 'KNVA-KNFAK(01)'
record-KNFAK_01_046.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0370'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-CIVVE'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNA1-CIVVE'
record-CIVVE_047.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-ABTNR(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNVK-ANRED(01)'
record-ANRED_01_048.
perform bdc_field using 'KNVK-ANRED(02)'
record-ANRED_02_049.
perform bdc_field using 'KNVK-NAMEV(01)'
record-NAMEV_01_050.
perform bdc_field using 'KNVK-NAMEV(02)'
record-NAMEV_02_051.
perform bdc_field using 'KNVK-NAME1(01)'
record-NAME1_01_052.
perform bdc_field using 'KNVK-NAME1(02)'
record-NAME1_02_053.
perform bdc_field using 'KNVK-TELF1(01)'
record-TELF1_01_054.
perform bdc_field using 'KNVK-TELF1(02)'
record-TELF1_02_055.
perform bdc_field using 'KNVK-ABTNR(01)'
record-ABTNR_01_056.
perform bdc_field using 'KNVK-ABTNR(02)'
record-ABTNR_02_057.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-AKONT'
record-AKONT_058.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-ZTERM'
record-ZTERM_059.
perform bdc_dynpro using 'SAPMF02D' '0220'.
perform bdc_field using 'BDC_CURSOR'
'KNB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB5-MAHNA'
record-MAHNA_060.
perform bdc_dynpro using 'SAPMF02D' '0230'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VRSNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-BZIRK'
record-BZIRK_061.
perform bdc_field using 'KNVV-AWAHR'
record-AWAHR_062.
perform bdc_field using 'KNVV-WAERS'
record-WAERS_063.
perform bdc_field using 'KNVV-KALKS'
record-KALKS_064.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-LPRIO'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-LPRIO'
record-LPRIO_065.
perform bdc_field using 'KNVV-KZAZU'
record-KZAZU_066.
perform bdc_field using 'KNVV-ANTLF'
record-ANTLF_067.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-PERFK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-PERFK'
record-PERFK_068.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_transaction using 'XD01'.
enddo.
perform close_group.
perform close_dataset using dataset.
Reward if found helpful....
Cheers,
Chandra Sekhar. -
hi friends,
Iam new to Bapi's and Bdc's plz tell me which sites are good for learning and i also want some realtime examples or codes.
Thanks in advance.Hi
what is BAPI?
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
The following standardized BAPIs are provided:
Reading instances of SAP business objects
GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
Create( ) and CreateFromData! ( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( )
The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
www.sappoint.com/abap/bapiintro.pdf
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
u can check the below the material also
Example Code
U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
U can find these parameters for a particular condition type in table KONV.
*& Form saveTransactionJOCR
text
--> p1 text
<-- p2 text
FORM saveTransactionJOCR .
data: salesdocument like BAPIVBELN-VBELN,
order_header_inx like bapisdh1x,
order_header_in like bapisdh1,
return type standard table of bapiret2 with header line,
conditions_in type standard table of bapicond with header line,
conditions_inx type standard table of bapicondx with header line,
logic_switch like BAPISDLS,
step_nr like conditions_in-cond_st_no,
item_nr like conditions_in-itm_number,
cond_count like conditions_in-cond_count,
cond_type like conditions_in-cond_type.
salesdocument = wa_order_information-VBELN.
LOGIC_SWITCH-COND_HANDL = 'X'.
order_header_inx-updateflag = 'U'.
conditions
clear conditions_in[].
clear conditions_inx[].
clear: step_nr,
item_nr,
cond_count,
cond_type.
step_nr = '710'.
item_nr = '000000'.
cond_count = '01'.
cond_type = 'ZCP2'.
CONDITIONS_IN-ITM_NUMBER = item_nr.
conditions_in-cond_st_no = step_nr.
CONDITIONS_IN-COND_COUNT = cond_count.
CONDITIONS_IN-COND_TYPE = cond_type.
CONDITIONS_IN-COND_VALUE = 666.
CONDITIONS_IN-CURRENCY = 'EUR'.
append conditions_in.
CONDITIONS_INX-ITM_NUMBER = item_nr.
conditions_inx-cond_st_no = step_nr.
CONDITIONS_INX-COND_COUNT = cond_count.
CONDITIONS_INX-COND_TYPE = cond_type.
CONDITIONS_INX-UPDATEFLAG = 'U'.
CONDITIONS_INX-COND_VALUE = 'X'.
CONDITIONS_INX-CURRENCY = 'X'.
append conditions_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = salesdocument
ORDER_HEADER_IN = order_header_in
ORDER_HEADER_INX = order_header_inx
LOGIC_SWITCH = logic_switch
TABLES
RETURN = return
CONDITIONS_IN = conditions_in
CONDITIONS_INX = conditions_inx
if return-type ne 'E'.
commit work and wait.
endif.
ENDFORM. " saveTransactionJOCR
Bdc to Bapi
The steps to be followed are :
1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
[for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
2. Create a Z program and call the BAPi (same as a Funtion module call).
2. Now, if you see this BAPi, it has
-> Importing structures.
eg: SALESDOCUMENT: this will take the Sales order header data as input.
-> Tables parameters:
eg: ORDER_ITEM_IN: this will take the line item data as input.
Note :
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data
Possible UPDATEFLAGS:
U = change
D = delete
I = add
Example
1. Delete the whole order
2. Delete order items
3. Change the order
4. Change the configuration
Notes
1. Minimum entry:
You must enter the order number in the SALESDOCUMENT structure.
You must always enter key fields for changes.
You must always specify the update indicator in the ORDER_HEADER_INX.
2. Commit control:
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
For further details... refer to the Function Module documentation for the BAPi.
Bapi to VB(Visual Basic)
Long back I had used the following flow structure to acheive the same.
Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
You need to have com4abap.exe
If com4abap is installed you will find it in sapgui installatin directory , C:Program FilesSAPpcsapguiRFCSDKcom4abap.
else refer OSS note 419822 for installation of com4abap
after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
for setting up com4abap and rfc destination please refer to the documentation for com4abap.
Invoke NEW DCOM session
call function 'BEGIN_COM_SESSION'
exporting
service_dest = service_dest "(this will be a RFC destination created in SM59)
importing
worker_dest = worker_dest
exceptions
connect_to_dcom_service_failed = 1
connect_to_dcom_worker_failed = 2
others = 3.
call function 'create_com_instance' destination worker_dest
exporting
clsid = g_c_clsid
typelib = g_c_typelib
importing
instid = g_f_oid
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
call function 'com_invoke' destination worker_dest
exporting
%instid = g_f_oid
%method = 'UpdatePDF'
sntemp = g_v_const_filent
snsysid = sy-sysid
snflag = 'N'
tables
rssaptable = g_t_pdfdetail1
%return = g_t_pdfdetail1 "t_test
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
then close the com session , using
FM delete_com_instance
FM END_COM_SESSION
BDC
BDC:
Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
Features :
BDC is an automatic procedure.
This method is used to transfer large amount of data that is available in electronic medium.
BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
BDC uses normal transaction codes to transfer data.
Types of BDC :
CLASSICAL BATCH INPUT (Session Method)
CALL TRANSACTION
BATCH INPUT METHOD:
This method is also called as CLASSICAL METHOD.
Features:
Asynchronous processing.
Synchronous Processing in database update.
Transfer data for more than one transaction.
Batch input processing log will be generated.
During processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION METHOD :
This is another method to transfer data from the legacy system.
Features:
Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
Updating the database can be either synchronous or asynchronous. The program specifies the update type.
Transfer data for a single transaction.
Transfers data for a sequence of dialog screens.
No batch input processing log is generated.
For BDC:
http://myweb.dal.ca/hchinni/sap/bdc_home.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sapdevelopment.co.uk/bdc/bdchome.htm
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
Check these link:
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm
http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
http://www.planetsap.com/bdc_main_page.htm
call Transaction or session method ?
Reward points if useful
Regards
Anji -
What is the advantage of using lsmw instead of bdc whether there is any disadvantage in using lsmw
Hi,
LSMW and BDC are vastly different.
BDC (Batch Data Communication) is a technology used for data transfer.
it is meant for transferring data thru SAP transactions itself. when u use BDC for data transfer,
the sequence of steps is the same as when u use standard sap transaction screens for data upload. the only difference is that u can use different options for foreground/background processing.
LSMW on the other hand is a tool that helps migrate data from a legacy system (non-sap system ) to SAP system.
it offers u various options to use either batch input, direct input, BAPIs or idocs.
it involves a series of some 17-18 steps to migrate data.
BDC:
Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system
or from a non-SAP system to SAP System.
Features :
BDC is an automatic procedure.
This method is used to transfer large amount of data that is available in electronic medium.
BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
BDC uses normal transaction codes to transfer data.
Types of BDC :
CLASSICAL BATCH INPUT (Session Method)
CALL TRANSACTION
BATCH INPUT METHOD:
This method is also called as CLASSICAL METHOD.
Features:
Asynchronous processing.
Synchronous Processing in database update.
Transfer data for more than one transaction.
Batch input processing log will be generated.
During processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION METHOD :
This is another method to transfer data from the legacy system.
Call transaction.
1) asynchronous processing
2) can transfer small amount of data
3) processing is faster.
4) errors need to be handled explicitly
5) data is updated automatically
Session method.
1) synchronous processing.
2) can tranfer large amount of data.
3) processing is slower.
4) error log is created
5) data is not updated until session is processed.
Session method is to populate the data by filling BDC structure
and keep as session to process from SM37 to post in appropriate Transaction.
Call transaction method is to post the data directly into the Transaction from an Executable program.
Features:
Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
Updating the database can be either synchronous or asynchronous. The program specifies the update type.
Transfer data for a single transaction.
Transfers data for a sequence of dialog screens.
No batch input processing log is generated.
For BDC:
http://myweb.dal.ca/hchinni/sap/bdc_home.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sapdevelopment.co.uk/bdc/bdchome.htm
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
LSMW:
The LSM Workbench is an R/3-based tool that supports You when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.
The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via batch input, direct input, BAPIs or IDocs.
Furthermore, the LSM Workbench provides a recording function that allows to generate a "data migration object" in an entry or change transaction.
The main advantages of the LSM Workbench:
Part of R/3 and thus independent of individual platforms
A variety of technical possibilities of data conversion:
Data consistency due to standard import techniques:
Batch input
Direct input
BAPIs (Business Application Programming Interfaces)
IDocs (Intermediate Documents)
The import technique to be used in an individual case depends on the business object.
Generation of the conversion program on the basis of defined rules
Clear interactive process guide
Interface for data in spreadsheet format
Creation of data migration objects on the basis of recorded transactions
Charge-free for SAP customers and SAP partners
http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/content.htm
http://www.sap-img.com/sap-data-migration.htm
http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
http://allsaplinks.com/lsmw.html
http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
some more links
BDC
http://www.sap-img.com/bdc.htm
LSMW
http://www.sap-img.com/sap-data-migration.htm
http://www.sapgenie.com/saptech/lsmw.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
Thanks
Manju
Maybe you are looking for
-
Portable hard drive works in boot camp, not on os x
hi all, upgraded to macbook c2d cos i had this same problem with my ibook g4. have a usb 2.0, portable drive with a usb Y-wire. it mounts properly sometimes but doesnt read or write to it reliably. in fact, it always ends up hanging and i m left with
-
How to return my contacts after they deleted suddenly
Actually , i don't know how they have been deleted or removed So can anyone help me or to tell a way to return my contacts again
-
The never ending question....
I upgraded multiple songs today on iTunes Plus. I received multiple server error messages during the multiple attempts today. One time I quit iTunes during one of my futile upgrade attempts and iTunes told me that it would check for my purchases next
-
Hello. I'm facing problem during client connection throungth proxy. The error messagge is: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 302 Moved Temporarily" at sun.net.www.protocol.http.HttpURLConnection.doTunne
-
Installing Oracle 9i on Linux Red Hat 7.2
I got the following error when installing Oracle 9i on Linux Red Hat 7.2: Initializing Java Virtual Machine from /tmp/OraInstall/jre/bin/jre. Please wait... jre was not found in /tmp/OraInstall/jre/bin/../bin/i586/green_threads/jre Any ideas how to f