Can we write code using BD79(ALE IDoc Conversion Rule)
Hi -
I had created a conversion rule that specifies for the field account group (KTOKD) on KNA1: I need to include the following logic :
if the customer number (KNA1-KUNNR) is in the range 0010000000-0019999999 or 0140000000 to 0149999999, then change the account group value to u201CSKIPu201D.
So I had created a conversion rule using BD62.
In BD79, I had set the constant to SKIP.
But where to include the following logic :
if the customer number (KNA1-KUNNR) is in the range 0010000000-0019999999 or 0140000000 to 0149999999, then change the account group value to u201CSKIPu201D.
Thanks,
Gyanaraj
Hi Shital ,
Thank U very much for replying to my question.
But when I m trying to create the same , by clicking Use general rule & specifying special conversion routine ZBLNK , it is throwing the following error "Conversion exit ZBLNK does not exist".
Please can u help me out.
Thanks,
Gyanaraj
Similar Messages
-
ALE IDoc Conversion Rule or BADI
Hi,
I'm new to ALE IDoc. I have a requirement to hide some sensitive data field for the HR information when outbound the Idoc.
Example, I need to outbound the IT8 Basic Pay with payscale area etc but not with the basic pay amount. I can convert the basic pay amount to zero when the idoc is being created.
I've searched through some information and found out that there are several ways to achieve it. However, I'm not sure which one is a better way.
Is it using the Conversion Rule (BD62) or using Badi or Idoc Reduction method is better?
Kindly give me some hints as I'm very confuse of which one is the better solution.
Many thanks in advance.No user exit is needed for conversion rule.
However, you should remember that conversion rules are applied segment fields for a particular message type. So wherever the IDoc message type is used the rule will be applied. If you want to associate the rule for any other condition in addition to message type better to go with a BADI
These are steps to create and apply a conversion rule to a message type:
1. Transaction BD62 - Create conversion rule and assign it to a IDoc segment
2. Transaction BD79 - Define the conversion rule by selecting your field and clicking display button. Once inside you can use various options like set constant to map 0 to the basic pay
3. Finally assign the conversion rule to your message type using BD55
As for BADIs, IDOC_DATA_MAPPER is also suited for your requirement, the method PROCESS, allows you to manipulate your IDoc fields whichever way you want. You get the control record, data records, using which you can restrict your manipulation to specific message type or other conditions
To above post, BADI IDOC_CREATION_CHECK should not be used for mappings/conversions as its specific purpose is to stop creation of an IDoc under required conditions -
What are the Tcodes commanly used in ALE-IDOCs?
Hi,
What are the Tcodes commanly used in ALE-IDOCs?
Regards,
Chow.Hi,
Go through the following Tcode for ALE
ALE IDOC
Sending System(Outbound ALE Process)
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Create Model View
Tcode BD82 ? Generate partner Profiles & Create Ports
Tcode BD64 ? Distribute the Model view
Message Type MATMAS
Tcode BD10 ? Send Material Data
Tcode WE05 ? Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 ? Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Create Model View
Tcode BD82 !V Generate partner Profiles & Create Ports
Tcode BD64 !V Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 !V Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 !V Send Material Data
Tcode WE05 !V Idoc List for watching any Errors
1)a Goto Tcode SALE
Click on Sending & Receiving Systems-->Select Logical Systems
Here Define Logical Systems---> Click on Execute Button
go for new entries
1) System Name : ERP000
Description : Sending System
2) System Name : ERP800
Description : Receiving System
press Enter & Save
it will ask Request
if you want new request create new Request orpress continue for transfering the objects
B) goto Tcode SALE
Select Assign Client to Logical Systems-->Execute
000--> Double click on this
Give the following Information
Client : ERP 000
City :
Logical System
Currency
Client role
Save this Data
Step 2) For RFC Creation
Goto Tcode SM59-->Select R/3 Connects
Click on Create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
give the information for required fields
RFC Destination : ERP800
Connection type: 3
Description
Target Host : ERP000
System No:000
lan : EN
Client : 800
User : Login User Name
Password:
save this & Test it & RemortLogin
3)
Goto Tcode BD64 -- click on Change mode button
click on create moduleview
short text : xxxxxxxxxxxxxx
Technical Neme : MODEL_ALV
save this & Press ok
select your just created modelview Name :'MODEL_ALV'.
goto add message type
Model Name : MODEL_ALV
sender : ERP000
Receiver : ERP800
Message type :MATMAS
save & Press Enter
4) Goto Tcode BD82
Give Model View : MODEL_ALV
Partner system : ERP800
execute this by press F8 Button
it will gives you sending system port No :A000000015(Like)
5) Goto Tcode BD64
seelct the modelview
goto >edit>modelview-->distribute
press ok & Press enter
6)goto Tcode : BD10 for Material sending
Material : mat_001
Message Type : MATMAS
Logical System : ERP800
and Execute
7)goto Tcode : BD11 for Material Receiving
Material : mat_001
Message Type : MATMAS
and Execute --> 1 request idoc created for message type Matmas
press enter
Here Master Idoc set for Messge type MATMAS-->press Enter
1 Communication Idoc generated for Message Type
this is your IDOC
Change Pointers
I know how to change the description of a material using ALE Change Pointers.
I will give the following few steps
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.
select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
ALE/IDOC Status Codes/Messages
01 Error --> Idoc Added
30 Error --> Idoc ready for dispatch(ALE Service)
then goto SE38 --> Execute the Program RBDMIDOC
29 Error --> ALE Service Layer
then goto SE38 --> Execute the Program RSEOUT00
03 Error --> Data Passed to Port ok
then goto SE38 --> Execute the Program RBDMOIND
12 Error --> Dispatch ok
Inbound Status Codes
50 Error --> It will go for ALE Service Layer
56 Error --> Idoc with Errors added
51 Error --> Application Document not posted
65 Error --> Error in ALE Service Layer
for 51 or 56 Errors do the following steps
goto WE19 > give the IDOC Number and Execute>
Press on Inbound function Module
for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
Regards,
Priyanka. -
How can i write code in Inbound ABAP proxy method
Hi,
All
Iam doing server proxy ascenario
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
i have done
steps:
1:I have done inbound proxy interface in xi
2:i have created a inbound abap proxy in my SAP WEB AS6.4 using SPROXY.
3:I need to write code in Z11_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS method
if i double click on that method it is not opening how can I write code.Hi,
You have to goto the class
<b>ZCL</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS not
<b>Z11</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS
Check on the third step.
Regards
Vijaya -
How can i write code inside methods.
Hi,
I am new to wbdynpro. How can i write code in Webdynpro?
I have created one layout in that two textboxes are there. After entering the details when i click on the button the datas should be saved into the database table. How can i write code in this.
please help me.
ShyjaHi,
First in context create node for 2 input field. Then disign layout for input filds and do data binding. Then create button and assign ON action event to it. In action method use wizard to read the values from the node.
DATA: Node type REF TO IF_WD_CONTEXT_NODE,
elem_node1 TYPE REF TO if_wd_context_element,
stru_node1 type ZEMP.
Node = wd_Context->get_Child_Node( Name = `S_NODE2` ).
get element via lead selection
elem_node1 = node->get_element( ).
get all declared attributes
elem_node1->get_static_attributes(
IMPORTING
static_attributes = stru_node1 ).
INSERT ZEMP FROM stru_node1.
If helpful reward points.
Regards,
Karthick S -
Help with BD79 - IDOC conversion rules
Hi, I'm looking for a "How to" guide to help me with this transaction.
I need to do a very simple rule for segment E1MTXHM, in ABAP it can be done like this:
IF EMTXHM-TDID = 'IVER'.
E1MTXHM-TDSRPAS = 'Z'
ELSE.
* Source field
ENDIF.
But I expect that it's not necessary to write code to do that simple conversion in BD79, so can anyone help me?
Thank you.Thanks Pawan,
It's a very interesting blog, I already know how to do the first part of the blog but maybe someday I didn't know how to use a user exit.
In my scenario I need to create a more simple rule, but I don't know how to use transaction BD79. But I think with "Try and Error" I will get my expected result. -
Send custom error message using IDoc conversion rule?
Hello,
I am using an Idoc conversion rule in BD79 to load cost centers. In my conversion rule I use a conversion exit function module to concatenate 2 specific characters and sending cost center value together and then this output value placed in the receiving cost center field. This works fine, but now I want to send a custom error message to the idoc and fail the idoc if the sending cost center value is greater than 8 digits.
Does anyone know how to send an error message or update an idoc with an error message using a conversion rule (bd79)?
Thank you,
RhondaHi Rhonda,
Any luck on the below.. i have a similar issue...
Sorry to hijack your thread... -
Idoc Conversion rule, Change pointers and Filters
Hi Experts,
Please any one can help me out, i need material or clear picture about Idoc Conversion rule, Change pointers and Filters where we can use these concepts what is the befit for these concepts.
Thanks in advance,
Ramesh.Hi,
Check this link. It has got some of the tutorials you are looking for.
http://www.****************/Tutorials/ALE/ALEMainPage.htm
Cheers
VJ -
Hi,
What is idoc conversion rule? Why we need this?
While upgrading from 4.7 to ECC 6.0 what all precautions need to be taken for the existing standard idocs and custom idocs in the system.
Thanks & Regards,
Soumya.Hi,
ALE allows the user to perform an SAP transaction in the sending system, after-which the following steps occur:
1 or more communication IDocs (intermediate documents: container for the application data) are created in the sending system database. An ALE distribution model, that needs to have been configured, determines which systems the IDocs are to be sent
These communication IDocs, that contain the relevant application data of the transaction that was performed, are then passed to the ALE communication layer
This layer performs an RFC call, using the port definition and an RFC destination determined through the customer model
The IDocs are then transferred to the respective receiving systems. These could be SAP R/3, R/2 or external systems
If the receiving system is an SAP system then:
In the case of master data distribution the same transaction that was performed on the sending system is again performed on the receiving system with the data contained in the IDoc. This allows the data to go through the SAP checks before posting occurs
In the case of transaction scenarios the relevant data is passed to the respective transactions in order to load the required application document. Eg. A PO is loaded on the sending side, yet a SO is created on the receiving system
Master data has another difference:
It can be set up in such a way that any changes made to specific fields in master data tables can automatically trigger off the ALE distribution process for that particular master data object
If a master data object is created or changed on a sending system and distributed to another system the respective transaction is used to either create or change that respective master data object on the receiving system
In general, if standard SAP can't perform the task required then neither can ALE. It doesn't add functionality, it merely decouples it and allows you to distribute it onto other remote systems.
The Detail as described by SAP
In the output processing one of the function modules of the application creates an IDoc, the so-called master IDoc. This IDoc is sent to the ALE layer where the following processing steps are applied:
Outbound processing
Receiver determination
An IDoc is similar to a normal letter in that it has a sender and a receiver. If the receiver has not been explicitly identified by the application, then the ALE layer uses the customer distribution model to help determine the receivers for the message.
The ALE layer can find out from the model whether any distributed systems should receive the message and, if so, then how many. The result may be that one, several or no receivers at all are found.
For each of the distributed systems that have been ascertained to be receiver systems, the data that is specified by the filter objects in the customer distribution model is selected from the master IDoc. This data is then used to fill an IDoc, and the appropriate system is entered as receiver.
Data selection
Segment filtering
Individual segments can be deleted from the IDoc before dispatch by selecting Functions for the IDoc processing -> Settings for filtering in ALE Customizing. The appropriate setting depends on the sending and receiving logical R/3 System.
Field conversion
Receiver-specific field conversions are defined under Functions for the IDoc processing -> Conversions.
General rules can be specified for field conversions; these are important for converting data fields to exchange information between R/2 and R/3 Systems. For example, the field "plant" can be converted from a 2-character field to a 4-character field.
The conversion is done using general EIS conversion tools (Executive Information System).
Version change
SAP ensures that ALE functions between different R/3 System releases. By changing the IDoc format you can convert message types of different R/3 releases. SAP Development use the following rules when converting existing message types:
Fields may be appended to a segment type;
Segments can be added;
ALE Customizing keeps a record of which version of each message type is in use for each receiver. The correct version of the communication IDoc is created in the ALE output.
The resulting IDocs (it is possible that several IDocs could be created in the receiver determination) are referred to as communication IDocs and are stored in the database. The dispatch control then decides which of these IDocs should be sent immediately. These are passed to the communications layer and are sent either using the transactional Remote Function Call (RFC) or via file interfaces (e.g. for EDI).
If an error occurs in the ALE layer, the IDoc containing the error is stored and a workflow is created. The ALE administrator can use this workflow to process the error.
Inbound processing
After an IDoc has been successfully transmitted to another system, inbound processing is carried out in the receiver system, involving the following steps in the ALE layer:
Segment filtering
Segment filtering functions the same way in inbound processing as in outbound processing.
Field conversion
Specific field conversions are defined in ALE Customizing.
The conversion itself is performed using general conversion tools from the EIS area (Executive Information System).
Generalized rules can be defined. The ALE implementation guide describes how the conversion rules can be specified.
One set of rules is created for each IDoc segment and rules are defined for each segment field.
The rules for converting data fields from an R/2-specific format to an R/3 format can be defined in this way. An example of this R/2 - R/3 conversion is the conversion of the plant field from a 2 character field to a 4 character field.
Data transfer to the application
Input control
When the IDocs have been written to the database, they can be imported by the receiver application.
IDocs can be passed to the application either immediately on arrival or can follow in batch.
You can post an inbound IDoc in three ways:
by calling a function module directly: A function is called that imports the IDoc directly. An error workflow will be started only if an error occurs.
by starting a SAP Business Workflow. A workflow is the sequence of steps to post an IDoc.
by starting a work item A single step performs the IDoc posting.
The standard inbound processing setting is that ALE calls a function module directly. For information about SAP Business Workflow alternatives refer to the online help for ALE programming. -
Hi all,
Good Morning Friends. I am looking for proper documentation which can help me to understand the concept of <b>Idoc conversion rules</b>. I search a lot in help.sap.com and also google resources, but couldn't figure out any. I am very much interested in comprehending this concept from quite a long time. Can anyone help me to find out good doc's on this concept. If you have any documents you can plz forward them to <b>[email protected]</b>.
Any kind of help will be appreciated and will be awarded points without failing.
Have a nice day !!
Thanks and Regards,
Varun.HI Ferry LIanto,
Thanks for your immediate reply. I have gone through this. I also want to learn the theoritical aspects behind this concept. Is there any documentation available in help.sap.com regarding this or are there any other resources available to learn this very much in detail ? I have tried rigorously, but couldnt trace any. If possible can you please help me in this regard ?
Thanks and Regards,
Varun.
Message was edited by: varun sonu -
How to create a sales order using PO ALE Idoc
Hi,
I have a purchase order in my ECC6 system, and output for this PO is ALE idoc.
Now I want to create a Sales order using that Idoc in the same system,
can anbody please tell the procedure
sreeramDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
Can I Write Portlets Using ColdFusion?
Can I write 5.04 Portlets using ColdFusion MX ? What issues would I run into?
As I mentioned before, you will need the Java EDK from Plumtree and CFMX. Extract the openfoundation.jar and edk.jar files from the Java EDK. Then add the paths to these files to your Java Class path under the CFMX Admin (Java and JVM). My class path looks something like this:
D:\CFusionMX\cfx\java,D:\CFusionMX\lib\cfx.jar,D:\plumtree\ptedk\5.1\java\devkit\WEB-INF\lib\edk.jar,D:\plumtree\ptedk\5.1\java\devkit\WEB-INF\lib\openfoundation.jar,
With that done, you should be all set to utilize the Java EDK from within your CFMX app. Some code that I just cut from one of my examples is as follows:
<!--- load the CommunityAccessLevel and PortletContextFactory objects ---><cfobject action="create" type="java" class="com.plumtree.remote.portlet.CommunityAccessLevel" name="CommunityAccessLevel"><cfobject action="create" type="java" class="com.plumtree.remote.portlet.PortletContextFactory" name="PortletContextFactory"><!--- get a javax.servlet.http.HttpServletRequest object from CFMX ---><cfset req = getPageContext().getRequest()> <!--- get a javax.servlet.http.HttpServletResponse object from CFMX ---><cfset res = getPageContext().getResponse()> <!--- declare portletContext object ---><cfset context = PortletContextFactory.createPortletContext(req, res)> <!--- get the portlet request ---><cfset portletReq = context.getRequest()> <!--- get the portlet user ---><cfset portletUser = context.getUser()><!--- get the current portlet ID ---><cfset portletID = portletReq.getPortletID()><!--- does the current user have admin rights to the current community? ---><cfif CommunityAccessLevel.Admin EQ portletUser.getCurrentCommunityAccessLevel()> ...
A lot of this code is out of examples on the developers site for the Java EDK. Most of it converts line by line pretty easily once you have things setup.
Hopefully this will help.-- Jeff -
Can I write code without being a developer
I've just got a magazine called :You can make an app' for iPhone with tutorial explaining app creation.
I've entered the code for the first tutorial and tried to run int, but Xcode informed me :
No signing identity found - Xcode can request a new iOS Development signing identity for you.
After connecting to the apple developer site it request I pay $99 to go any further.
Is there no way of compiling and testing code for newbies to play around with, without having to subscribe to the apple site?You can run your code on the simulator which is included with Xcode. Make sure you have the simulator selected as the target device device when you compile your code.
Select the simulator in the upper left hand side of the Xcode window next to the triangular button you use to compile -
Hi,
I have a requirement where I have a Inbound Idoc which has two segments say E1EDP03 and E1EDP20. Both are date fields.
now I want to map date from E1EDP03 if Qualif is Z01 to E1EDP20 using conversion rule.
E1EDP03 (Qualif. Z01) - DATUM -
>>> E1EDP20-EDATU
Is it possible to do this using conversion rule?
Thanks,Hi Shital ,
Thank U very much for replying to my question.
But when I m trying to create the same , by clicking Use general rule & specifying special conversion routine ZBLNK , it is throwing the following error "Conversion exit ZBLNK does not exist".
Please can u help me out.
Thanks,
Gyanaraj -
How can I write code that uses schemas returned by one query to run another
I need to use the data returned by this SQL
Select owner
From dba_tables
Where tablename = 'TRANSACT';
To run the following SQL for every schema in the database:
Select $vschema, count(*)
from $vschema..transact;
Where I am using $vschema as a variable to hold owners returned by the first statement.
I have tried using 1 cursor, 2 cursors, 1 coursor and an execute immediate command and either my code fails or I get a message that it ran successful but I cant see the data that I want returned by the second query.I don't actually want to get the count on the transact table for each schema I just used that as an example to simplify... Maybe the code that I have written so far would be better... Here is one attempt:
SET SERVEROUTPUT ON SIZE 1000000
SET VERIFY OFF
DECLARE
v_schema Varchar2(50);
v_chgdate DATE;
v_debits NUMBER(14,4);
v_amount NUMBER(14,2);
/* First cursor */
CURSOR get_schemas (v_schema OUT char) IS
SELECT DISTINCT t.owner
FROM sys.dba_tables t
WHERE t.table_name = 'GERCVLOG'
ORDER BY t.owner;
/* Second cursor */
CURSOR get_stats (v_schema IN char) IS
SELECT MAX(g.chgdate),
SUM(g.debits),
SUM(g.totalamt)
FROM &&v_schema..gercvlog g
WHERE g.chgdate >= '01-Jan-07' or
g.chgdate = (SELECT MAX(g1.chgdate)
FROM &&v_schema..gercvlog g1);
BEGIN
/* Open first cursor*/
OPEN get_schemas (v_schema OUT char);
LOOP
FETCH get_schemas INTO v_schema;
EXIT WHEN get_schemas%NOTFOUND;
dbms_output.put_line('Schema: '||v_schema);
OPEN get_stats (v_schema IN char);
LOOP
FETCH get_stats INTO v_chgdate, v_debits, v_amount;
FETCH get_schemas INTO v_schema;
EXIT WHEN get_stats%NOTFOUND;
dbms_output.put_line('Latest Import: '||v_chgdate);
dbms_output.put_line('Total Debits: '||v_debits);
dbms_output.put_line('Total Dollars: '||v_amount);
dbms_output.put_line('______________________________');
END LOOP;
CLOSE get_stats;
END LOOP;
CLOSE get_schemas;
END;
/
Maybe you are looking for
-
How to sync an iphone to a newly installed OS 10.7.5?
I just did a clean install of OS 10.7.5 and know my iPhone fails to sync w/iTunes. How do I fix this? Sync session fails to start is the error message that get after trying varoius options. I'm missing something.......any ideas? thanks john
-
I'm getting what appears to be a memory leak in LR. Is anyone else experiencing this ramp of memory usage as viewed in Task Manager. I have 32GB of DDR3 installed and LR takes it all and want's more. The ramp peaks with all of physical memory allocat
-
Xl Reporter does not work after the upgrade to 2007A PL 47
Hi Experts UPgraded to 2007A PL 47 from 2005A. Upgrade was done successfully. However the XL reporter is not functioning. When you go to Tools and click on XL reporter nothing happens. No error message comes up even. Client is using SQL 2005 MS serve
-
How to use RichCopy to copy only files that have changed?
I am using RichCopy to copy files and folders from one system to another on a weekly basis. RichCopy is working fine, but it is copying 100% of the data every time. I am looking for a way to use RichCopy where it will compare files/folders from the
-
Strange spot in pictures, Strange spots in pictures
Hi all, I noticed that my iPhone camera takes pictures with some strange spots. Please see the attached picture. It should be a white wall. I already tried to clean the back of the iPhone and I'm also sure that it isn't a problem of the screen/displa