ABAP Extension Module and IDOC Creation
Dear Gurus,
I would like to send master data from SAP to IBM Websphere with the help of ABAP Extension module and populating idoc data using ABAP Event handler. Could you please let me know the flow of it.
Thanks in advance.
Thanks
Shanthi
Hi,
After calling MASTER_IDOC_DISTRIBUTE, you need to COMMIT. (COMMIT WORK).
Please go through these links.
http://help.sap.com/saphelp_erp2005vp/helpdata/en/78/21783151ce11d189570000e829fbbd/content.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
Regards,
Vivek LR
Edited by: Vivek LR on Jun 20, 2008 9:22 AM
Similar Messages
-
Change pointers and Idoc creation
Hello,
I would like to create change pointers for any changes regarding one of our customer infotypes: 9002 (hrp9002)
I was able to do that, however, I'm struggeling with the details.
The problem is that I do not want to send any data related to infotype 9002. I just need this change pointer to trigger idoc creation for the related objects.
Example: Let's assume that infotype 9002 gets created for position S 40001234. Once a night a customer report is executed via a job which reads all unprocessed change pointers (including the one mentioned above) and sends the corresponding object. In this case, an Idoc for the holder of position 40001234 should be created WITHOUT data for infotype 9002.
The message type is HRMD_A.
What do I need to do?
Thank you for your input.Hi,
For Info type 9002 we need to implement Badi HRALE00CHANGE_PTRS using below code.
LOOP AT t_changed_objects INTO wa_changed_objects .
CASE wa_changed_objects-infty.
WHEN '9002'.
wa_cp_data-tabname = 'HROBJINFTY'.
wa_changed_objects-plvar = '01' .
wa_cp_data-tabkey = wa_changed_objects .
wa_cp_data-cdchgid = 'U'.
* wa_cp_data-CDOBJCL = 'HRMD_A'.
APPEND wa_cp_data TO t_cp_data1 .
ENDCASE.
ENDLOOP.
IF t_cp_data1 IS NOT INITIAL .
CALL FUNCTION 'CHANGE_POINTERS_CREATE_DIRECT'
EXPORTING
message_type = 'HRMD_A'
TABLES
t_cp_data = t_cp_data1
EXCEPTIONS
number_range_problems = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDIF.
This code will create entry in BDCP2 table.
After thsi populating segemnet you need to code for below exit as .
EXIT_SAPLRHAL_003
IF PNNNN_NAME = 'P9002' .
*FIELD-SYMBOLS: <FS_plog> TYPE ANY. "Field Symbol for dynamic filling of data based on the structure
*Clearing the SUBRC
CLEAR SUBRC.
* fill workarea for infotype with infotype-data
ASSIGN pnnnn_data TO <FS_plog> CASTING TYPE P9002.
LS_9002 = <FS_plog>.
* move fields
MOVE-CORRESPONDING LS_9002 TO LS_p9002.
* fill IDoc-data with workarea for segmenttype
ASSIGN sdata_data TO <FS_plog> CASTING TYPE Z1P9002.
<FS_plog> = LS_P9002.
CONVERTED = ZCDP_IF_CONSTANTS_DTIRIS=>GC_CROSS .
ENDIF.
It will work fine.
Thanks
Anju -
Hello everybody,
I need that the IS-U payment run creates a PAYEXT or DIRDEB Idoc with BaseType PEXR2002 ( I need this for in-house cash).
Anybody here who knows how to do this?
Thx
ThorstenThersten,
I understand that after you send the IDoc info to SAP-Inhouse Cash, the entry/entries wud/cud be
DR: Subsidiary Bank
CR : Inhouse Cash Center
(OR) &
DR: Inhouse Cash Center
CR : House Bank
Another combination can be
DR: Subsidiary Bank
CR : Inhouse Cash Center
(OR) &
DR: Inhouse Cash Center
CR : Clearing Partner.
So while sending the IDocs to SAP Inhouse bank, you need to consider above entries & design the program accordingly.
But do remember that FYP1 entries usually wud be:
DR: Bank Clearing Account
CR: Contract Account
Below URL may be helpful to you
https://help.sap.com/saphelp_erp60_sp/helpdata/en/20/8ad8fa96494f16a8db9110234c855b/frameset.htm
Hope this helps
Rgds
Rajendra -
Need the approach for passing source to proxy and idocs
Hi PI mates,
i was struck in implementing one scenario.here is my scenario..i am getting source message (webservice call) and i need to pass it to table fields and as well standard idocs at the same time...for updating tables we are going with proxy.any how idocs will get update once we pass message.My question is how to go this approach..? we can create 2 structures at target but we dont have any conditions for routing .
is there any approach..pls light me.
thanks in advance,
LoordhHi Loordh
If you have an option of suggesting a change in SAP, this scenarios can be handled easily in SAP (ABAP).
I have seen cases when SAP does internal IDOC posting .So its possible for them to receive as proxy and call the FM to update the tables and IDOC creation/posting at the same time provided the structure you are using have all the fileds to create IDOC and update tables.
Else if its not an option open for you then you can create 2 operations mapping and call them in interface mapping ,standarted Interface determination should work given timing of posting is not very critical here(may be a sec or two delay in operations)
Best Regards
$rinivas -
Passing an XML file from WebDynpro app to ABAP function module
Hi all,
I'm stuck with a problem, and am hoping one of you could let me know how to proceed:
I need to pass an XML file (or at least the entire content of the XML) from my WebDynpro application to a backend ABAP function module. What I tried was this:
In my WebDynpro app, I read the XML and convert the content into one long string (using java.io.FileReader and java.io.BufferedReader). In my ABAP function module I created an import parameter of type String. I then imported the ABAP Function module into my WebDynpro app as a model. I then tried to pass the XML string to the ABAP module. What happens is this:
If the size of the string (XML) happens to be less than 255 characters, then it works. That is, the string is passed to the ABAP function module and I can see the contents. However, if the XML string happens to be greater than 255 characters, then it does not work. The string at the ABAP side is empty. Surprisingly, the ABAP module does not throw an error either. It just displays an empty string.
Could you please tell me what the problem is?
Thanks & Regards,
BijuHi Biju ,
Welcome to SDN.
If the import parameter is defined as type string it should work, however did you check whether your application pass it properly?
I have applications using strings as import parameters working fine. (webapplications (BSP) to RFC)
Regards
Raja -
Hai friends,
Thank you for the earlier replies.
Now i want to know the functoional flow of the HR module and list of BAPIs and IDOCs invloved in the HR.
thanks and replies will get good points.
ElamaranFor Fm`s and BAPI`s go to SE37 AND search on HR and RH
for Idocs go to WE30 search HR ....
for HR tables and Transactions
http://www.planetsap.com
http://www.atomhr.com/
http://www.sapcookbook.com/preview_hr_questions.htm
http://sap.ittoolbox.com/topics/t.asp?t=302&p=302&h1=302
http://help.sap.com/saphelp_470/helpdata/EN/8a/6a46347969e94be10000009b38f83b/frameset.htm
Re: What is ABAP-HR?
HR_Reports
Pl. award the points if it helps you ...
Thanks
Message was edited by: Saquib Khan -
Abap function module http_post and umlaut characters
I am using abap function module HTTP_POST to frame xml and send the data to our middleware system 'CASTIRON'.
Everything works fine but when there are any umlaut characters in xml, the function HTTP_POPST is unable to transmit the data and is creating SM21 updation failures. We are on ECC 6.0 unicode system.
Any help is vey much appreciated.Are you using a CDATA tag to encapsulate your data. Try doing it.
-
IHC errors :valid clearing partner not found and no header details found while idoc creation after f110
Please let me know where the config is missing for ihc automatic payment program.in we02 status is not 53.
Please helpHi
Please share the error message in the IDOC.
If the error message is IHC204 "No valid clearing partner was found", it may be due to the missing correct configuration in Set Up Creation of Payment Requests for Inbound IDoc in FI, which links the clearing partner, ALE logical system partner type and IHC account number.
Cheers
taro -
Web Dynpro Java Internationalization and backend ABAP function modules
Friends,
I have a requirement where I want my Web Dynpro Java application to support BRAZIL and CHINESE.
I have been through the sample programs and tutorials and I understand how to support my application in these 2 languages. The challenge I am facing is how to communicate the language to the backend code (ABAP function modules) so that the function modules can written language specific error messages and texts.
I searched SDN but could not find anything. Your help is appreciated.Prashant,
When you are configuring JCo connection in WebDynpro Content Administrator, just left language settings blank for metadata connection (you may do the same for data connection). Now WD will supply language of currently logged-in user when obtaining connection settings from system landscape and you'll get necessary functionality.
By default locale of user determined by parameter sap-locale (sap-locale=de_DE for example), settings of user's browser and lastly preferences of user stored in UME.
Btw, BRAZIL (or Portugees for this matter) is not fully supported language by SAP, so R/3 side may be not translated or partly translated.
Valery Silaev
SaM Solutions
http://www.sam-solutions.net -
ME23N restrict IDOC creation and keep traffic light yellow
Hi,
I have a requirement in which I need to restrict the EDI IDOC if there are errors in the PO. Also as the IDOC is not created the messages (type NEU) should remain with the yellow traffic light as the IDOC is not processed. What would be the best approach to keep the traffic light yellow , I have identified the point to restrict IDOC creation but the traffic light is set to red.
Thanks,
EshaHello Esha,
I have identified the point tojavascript:; restrict IDOC creation but the traffic light is set to red.
Yellow light in Output type shows its Not Processed. If you are talking about exits EXIT_SAPLEINM_002/EXIT_SAPLEINM_011 they come into picture when Output type processing started. So ultimately they will have either Success/Error status.
Even by setting sy-msgty = 'W' in EXIT_SAPLEINM_002 and raising exception will not help.
You can play around with FMs mentioned in group WMCP and can check. -
Help needed - ABAP for function modules and routines.
Dear BW gurus,
Hope everyone is doing great.
I gotta project recently and we are going live in 3 weeks.My BWLead is getting rolled out in a week and he has to make the knowledge transfer to me ASAP.The bottle-necking thing is I need to have a good idea about the function modules and routines.So I request our SND community to help me out with good ABAP documents for function modules,routines and query.
my mail id is [email protected]
Thanks in advance
Have a nice day
Regards
sathiyaHello Sam,
You can create function module in ABAP using tcode SE37.
For more informations on ABAP:
http://help.sap.com/saphelp_47x200/helpdata/en/c9/5472f6787f11d194c90000e8353423/frameset.htm
Use http://help.sap.com
and also use <b>ABAPDOCU</b> transaction.
Check these links also...
<b>Online PDFs:</b>
http://easymarketplace.de/online-pdfs.php
<b>ABAP HELP</b>
If you check these links, you can find many example programs.
http://www.sap-img.com/abap.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
http://sappoint.com/abap/
FAQs in ABAP
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
Smart forms
http://www.sap-basis-abap.com/sapsf001.htm
Workflow
<http://www.sap-img.com/workflow/sap-workflow.htm>
ALV
http://www.geocities.com/mpioud/Abap_programs.html
Mail
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
SAP Scripts:
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapuk.html
Some useful ABAP Links for learning:
http://cma.zdnet.com/book/abap/index.htm
http://www.sapdevelopment.co.uk/
http://www.sap-img.com/
http://juliet.stfx.ca/people/fac/infosys/abap.htm
http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://www.sapgenie.com/abap/example_code.htm
http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
http://www.sap-img.com/abap-function.htm
http://www.sapgenie.com/abap/code/abap19.htm
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.planetsap.com/Tips_and_Tricks.htm
http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
http://www.henrikfrank.dk/abapexamples/index.html
http://sap.ittoolbox.com/documents/document.asp?i=752
http://members.aol.com/_ht_a/skarkada/sap/
http://sappoint.com/abap/
http://members.tripod.com/abap4/SAP_Functions.html
http://members.ozemail.com.au/~anmari/sap/index.html
http://www.planetsap.com/Userexit_List.htm
http://www.planetsap.com/Tips_and_Tricks.htm
http://www.kabai.com/abaps/q.htm
http://www.planetsap.com/Userexit_List.htm
http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
http://www.sap-basis-abap.com/index.htm
http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
http://www.geocities.com/ResearchTriangle/1635/system.html
http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
http://www.sapfans.com/sapfans/repos/saprep.htm
http://www.planetsap.com/howdo_a.htm
http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
http://www.sapgenie.com/abap/smartforms_detail.htm
http://www.sap-img.com/abap.htm
http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
http://www.geocities.com/victorav15/sapr3/abap.html
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://abap4.tripod.com/Other_Useful_Tips.html
http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
http://www.sap-basis-abap.com/sapmm.htm
http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
http://sapfans.com/
http://cma.zdnet.com/book/abap/ch03/ch03.htm
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapuk.html
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://www.sapgenie.com/abap/index.htm
http://www.sap-img.com/abap.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
http://www.thespot4sap.com/
http://www.kabai.com/abaps/q.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapgenie.com/abap/tips_and_tricks.htm
http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
For FAQ
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.sapgenie.com/faq/abap.htm
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
http://www.sapgenie.com/abap/bapi/example.htm
Web log for receive email and processing it through ABAP
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
For Logical database
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Useful link to websites
http://www.hernangn.com.ar/sap.htm
Useful for background
http://www.sappoint.com/basis/bckprsng.pdf
http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
Table control in BDC
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
For posting web log,
/people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
Dynamic Internal table -web log in sdn
/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
ALV
http://www.geocities.com/mpioud/Abap_programs.html
Mail
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
BOM Explosion
/people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
BOM
http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
http://www.sap-basis-abap.com/sappp007.htm
OLE
http://www.sapgenie.com/abap/ole.htm
http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
ALVGRID with refresh
http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
For language setting and decimal separator
/people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
Oracle queries
http://sqlzoo.net/
To format SQL
http://www.sqlinform.com/
SCOT settings
http://www.sap-img.com/basis/basis-faq.htm
Status Icon [ALV,Table Control,Tab Strip]
http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
ALV Group Heading
http://www.sap-img.com/fu037.htm
For multiMedia
/people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
Uploading LOGO in SAP
http://www.sap-img.com/ts001.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
http://www.consolut.de/saphelp/sap_online_help.html
http://www.sap-img.com/
http://www.sappoint.com/
http://www.sapdevelopment.co.uk/
http://www.allsaplinks.com/idoc_search.html
Best Regards,
Thangesh -
What is the difference between SAP HR module and SAP-ABAP-HR?
what is the difference between SAP HR module and SAP-ABAP-HR?
Thanks in advance..:)Hi,
SAP-HR is software component like SAP-BASIS is a component.
Its part of the CORE.
As far as I know there is nothing like SAP-ABAP-HR.
But ABAP offers some special syntax for HR though.
Like INFOTYPES, PROVIDE ENDPROVDIE etc.
Regards,
Sesh -
IDOCs creation - Transfer Orders(TOs) for Deliveries - Basic doubts, thanq
Hi Experts,
Am new to IDOCs. I hv a requirement, so, request u that, Can I get some Wht to do tips from u?
My doubts:
1- I hv been asked to create IDOC, Wht does it mean?
2 - How the created IDOC will be get posted?
My requirement is:
Original inbound idoc sent from Gentran will update the delivery with all serial numbers per material for all serialized product. The message code will be the indicator that a Transfer Order-TO, idoc must be created for TO confirmation.
I need to do===> Should be executed only when the message code on the delivery idoc is u201CTOCu201D. Look up the warehouse code on the delivery header using the delivery nbr in the delivery idoc. Create a new TO confirm idoc per delivery idoc being processed. Create a line item on this idoc for every line on the delivery idoc. Each TO line includes the delivery number and delivery item number so the TO number and line number can be looked up in table LTAP by using the delivery number and line item number found on the delivery idoc. There will be at 2 transfer orders for each delivery item b/c of the 2 step pick process, so select the TO nbr that has 916 as the destination storage type (LTAP-NLTYP). There may be more than 1 pair of TOs per delivery item so this must be completed for each TO found relevant to each delivery item.
The inbound delvry03 idoc will update the delivery with the serial numbers as part of the standard functionality. Since the transfer order must also be confirmed with the quantities on the inbound idoc, an additional idoc must be created from within the delivery update process. The transfer order can be updated and confirmed using the standard idoc and function module which should be created and initiated from the delivery update function module customer exit.
Source = DELVRY03 Destination = WMTCID01
Record Name-Field Name-Record Name-Field Name-Description---Comments
E1EDL20 VBELN-E1LTCOH-LGNUM-Warehouse Number-Look w/ idoc delivery nbr
E1EDL20 VBELN-E1LTCOH-TANUM-Transfer Order Number- Look w/ idoc delivery nbr
E1EDL24 POSNR-E1LTCOI-TAPOS-Transfer Order Line Item- Look w/ idoc delivery line nbr
EVERY THING IS DATA TRIGGERED!!!
thanq
Edited by: Srinivas on Jun 27, 2008 4:41 PMIDOC Programming
There are two processes in IDOC processing one is INBOUND PROCESS( IDOC coming to the system and its handling at various stages) and the other is OUTBOUND PROCESS( IDOC is send to other system . Separate ABAP programs are written for these 2 processes and different configuration settings are required for each one .Depending upon the trigeering mechanism different programming approaches are used.OUTBOUND PROGRAMS handle the IDOC creation and INBOUND PROGRAMS handle the inbound IDOC and the data trasfer from the IDOC to the database tables.
NEED FOR ABAP PROGRAMMING arises if
1)New IDOC was created
Depending upon the triggering mechanism i.e change pointer,message control
etc the programming technique changes and the type of process.
2)Existing IDOC was extended
User Exits are used to populate data in new segments added and to read them
back.
3)To enhance an exsiting process.
User Exits are used .
Basic structure of an OUTBOUND PROGRAM
The basic structure of all outbound programs is same. The CONTROL
record which is of TYPE EDIDC has to be filled. It contains important fields like
IDOCTP IDOC type
MESTYP Message Type
RCVPRN Recieving Partner (Destination)
RCVPRT Partner Type (it is LS i.e Logical System)
The DATA RECORD internal table which is of TYPE EDIDD has to be filled
in the same order as there are segments in the IDOC definition.
It has 2 important fields which are to be filled ,these are
SEGNAM Name of the segment
SEGDATA Data in the segment and can be upto 1000 bytes.This field
is corresponds to each data segment in the IDOC.
e.g.
DATA INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.
DATA W_SEGDATA LIKE zsegment "custom segment zsegment
INT_EDIDD-SEGNAM = 'ZSEGMENT'
W_SEGDATA-field1 = value "taken from some table
W_SEGDATA-field2 = value "taken from some table
INT_EDIDD-SEGDATA = W_SEGDATA
APPEND INT_EDIDD
This will fill the data record corresponding to the segment ZSEGMENT . For all
segments the sam steps will be repeated until all the data corresponding to all the
segments in the idoc is filled in the internal table of type EDIDD.
There is only one control record and can be multile data records in the idoc
structure.
Which data is to be extracted from the tables to be filled in EDIDD type internal table is determined in standalone programs from the objects which are specified in the selection screen and from the object key passed to the function module in case of message control and is taken from BDCP table in case of change pointers using function modules "CHANGE_POINTERS_READ"
In case of stand alone programs and function modules based on change pointers method the function module "MASTER_IDOC_DISTRIBUTE" is used to send the IDOC to ALE layer for distribution ,in case of message control it is handled automatically by the RSNASTED program invoked by the message control.
OUTBOUND PROCESS AND OUTBOUND PROGRAM.
Outbound programs are used in outbound process to genearte IDOCs . There
purpose is to extract the data from the tables and to fill the IDOC data records
and the control record in the IDOC and pass ito the ALE layer for distribution to the recieving system .
Depending upon the triggering mechanism (how and when the outbound program will be started different techniques and interface is used for outbound program.
1)Message control
Application like PO(purchase order) creation use this technique , where the output type is linked to the application(Message control is a configurable cross application component which can be set in IMG .Such programs are created in the form of function modules and linked to the output type which is linked to the apllication.These have predefined interfaces.
In outbound programs(function module) that use message control the key of the
application document is passed to the function module whcig will read the data from the table depending upon the key passed(NAST structure) and fill the IDOC segemnts with the application data.The control record is also passed to the function module but is not fully filled, the rmaining fields are filled and the control is passed back to the calling program which is RSNASTED and is invoked by the
message control to process ALE and EDI output types and this program on recieving the IDOC data will create the physical IDOC in the system.
The parameteers passed to the function module are
IMPORTING PARAMETERS
OBJECT LIKE NAST
It contains documents key.
CONTROL_RECORD_IN LIKE EDIDC
It contains the partailly filled control record
EXPORETING PARAMETER
OBJECT_TYPE
CONTROL_RECORD_OUT LIKE EDIDC
TABLES
INT_EDID LIKE EDIDD
The internal table used to fill the data records in the same order as they exists in the IDOC.
The important parameters that should be filled in the custom function module are
CONTROL_RECORD_OUT and INT_EDIDD .The OBJK field of the structue NAST contains the key of the apllication document.
2)Stand alone programs
Generally used for Master Data transfer and as such depending upon the requirement can have different interfaces.The programs have a selection screen which has select options to select the objects, and parameters for specifying the recipient Logical System and the Message Type.
Data is selected based on the specified objects from the tables . and control record of type EDIDC is created and filled with important values like DIRECTION ,IDOCTP,RCVPRT,RCVPRN and MESTYP .
Data is filled in an internal table of TYPE EDIDD according to segment definitions
and in same order and the function module MASTER_IDOC_DISTRIBUTE is called passing the control record and the internal table containg IDOC data and importing an internal table consisting of control records for each communication IDOCS created.
3)Change pointer
Change Pointer table is read and checked if changes were made to important fields , if so the outbound program will be triggered automatically , these have predefined interfaces
ALE/IDOC Transaction
SALE Area Menu for ALE configurations.It includes transactions for
Logical System definition and linking it to a client, Transactions for
RFC Destination and Port Definition Etc.
SM59 RFC Destination
Here we specify the login settings for the destination including
the I.P address or Application Server name and the User name and
password.The information entered here is used to run Remote Function
Calls(RFC ) on the destination server .We can create number of types
of RFC Destinations but 3 types are important .
R/3 (R/3 to R/3), LS(logical system) and TCP/IP.
The name of the RFC destination should be same as that of Logical
System as it helps in creation of automatic partner profiles.
WE21 Port Definition.
There are 6 types of ports but only 2 types File and Transactional RFC
types of ports are important.
We have to specify the RFC Destination before a port can be created.
WE57 This is used to assign the Inbound function module to the Message Type
and to the IDOC Type.
WE42 This is used to define the process Code for Inbound Processing.
BD95 Define Filter object type .We can specify the field and the table it belongs
to as a filter object .
BD59 Assignment of Filter object type to the Message Type .Here we create the
link between Filter object and the segment and the message type and the
segment Field.
BD50 Set message Type to reducible.
BD65 Define Mandatory Fields.
BD64 Distribution Model . Also known as Customer Distribution Model Used to
define all the messages that will be exchanged between remote systems
and the name of thes logical systems. Any filters can also be specified.
The model once created has to be distributed on every system which will
be communicating ,It can be maintained on only One system.
BD21 Creating IDOcs from change pointers.
This can be used to create IDOCs from change pointers for a particular
message LIKE MATMAS.
BD22 This can be used to delete change pointers.
BD87 Status Monitor. Idocs can be selected base on number of criteria and there
processing status can be seen in detail.
BD10 Material Master Data Distribution .
Based on Message MATMAS.
BD12 Customer Master Data Distribution .
Based on Message CREMAS.
BD14 Vendor Master Data Distribution
Based on Message DEBMAS .
BDFG Generate ALE Interface for BAPI.
Here we specify the Business Object and the BAPI Function module for
which the interface has to be created.
WE31 Segment Editor.
This is used to create segments. We create the segment type and
segment definition is automatically created by editor e.g. Z1DUMMY is
segment type and Z2DUMMY is the segment definition .We specify the
fields and the data elements these cp\orresponds to create segments.
WE30 IDOC Editor
It is used to create a new IDOC Type or IDOC Extension .We specify the
segments that will be addd to the IDOC type.
WE02/05 IDOC List.
Various selct options and parameters are provided to select IDOCs
depending on the date, direction , mesage type etc.
WE20 Partner Profile
Here we create partner profile for each and every partner from / to which
the messages will be exchanged.There are 6 types of PF generally only
profiles of type LS(Logical System) ,KU(Customer) ,LI(Vendor) is used.
We specify the partner number and partner type and the agent and
the agent type responsible for handling of errors .
For every message send to the partner we have a outbound record and for
evry message coming from the partner we have the inbound record .
We specify the message in the otbound/inbound records ,double
clicking will take us to the detailed screen where the IDOC Type ,Port
and whether the IDCO will be immediatelt processed or collected are
mentioned. -
Extension of generated Idocs types
hello,
does anybody knows why I can not create extension of generated (means in table EDBAS-GENERATED = 'X') idocs?
I tried to extend idoc BATMAS03 on R/3 Ecc 6 and got message:
message e099(b1) with
'Action is not possible for generated idoctypes'
In former version of R/3 4.6C it was possible to extend such IDoc BATMAS02 (generated one) without any problems.
Of course I found in program MSED5F02 in routine CREATE_EXT_STRUCTURE new (in comparison to 4.6C) extra check which protects against extension of generated IDocs, but I want to get to know what was behind that decision or how to workaround that problem.
Thanks in advance,
MarcinHi,
User Exits are used to populate data in new segments added and to read them
back which provides extension to existing idocs.
IDOC EXTENSIONS
SAP delivers Basic IDOC types such as DEBMAS02, MATMAS02, ORDERS02, and WMMBID01. By extending the Basic IDOC type, you are actually creating a new IDOC type. You create a new segment with the additional fields. This new segment has to be associated with one of the existing Basic IDOC segments. Then you create a new extension type, which is associated with the Basic IDOC type. This results in a new IDOC type. In order for ALE function modules to relate to this new IDOC type, the IDOC type is linked to the corresponding message type. Note that you should not add fields to existing segments but should create a new segment and associate it with an existing segment. This, in a nutshell, is the process of creating IDOC extensions.
In our example, the Basic IDOC type DEBMAS02 is used to communicate Customer Master data to the SAP Customer Master application. Even though the application has a screen to enter and store a contact personâs business address (see Figure 1), DEBMAS02 does not have a segment or fields that communicate the contact personâs business address. If your business requires that this business address be communicated to the other system through the ALE interface for Customer Master, then you have to extend the DEBMAS02 IDOC type, and enhance the corresponding ALE function module.
In DEBMAS02 the contact person fields are present in segment E1KNVKM and the business address of the contact person is stored on the SADR SAP table. You need to create a new segment, Z1SADRX, that is associated with E1KNVKM. This will be done in the process of creating an extension type ZDEBMASX. This extension type will then be associated with a new IDOC type, ZDEBMASZ. IDOC type ZDEBMASZ will be linked to message type DEBMAS for Customer Master. The final step in the IDOC extension process is to check the new objects. This check also verifies the structural integrity of the IDOC type. Letâs look at each of these steps in more detail.
1. Create an Extension Type and a New Segment.
First, determine the fields on table SADR that you are going to provide for in the new segment Z1SADRX. You need fields for name, street, city, region, and country to give the business address of the contact person. You also need fields for the address number. ADRNR is a field in SAP tables such as SADR that uniquely identifies the address of an entity. This field is cross-referenced from other tables to the SADR table to obtain the full description of the address. Because this is an IDOC type for master data, the first field of the new segment will be MSGFN. The message function field informs the receiving system of the action to be taken for that particular segment. In the code that you write for populating the new segment, the value of the message function is the same as that of the parent segment E1KNVKM. In all, you will have 12 fields in segment Z1SADRX (see Table 1).
To create an extension type and new segment:
Use transaction WE30 or from WEDI go to Development -> IDOC types.
Enter ZDEBMASX for Object Name.
Choose Extension Type.
Click on Create.
You will see a pop-up screen. Choose Create New, and enter a description. For version 4.x, enter DEBMAS02 in the Linked Basic Type field. Enter.
You will see a screen with ZDEBMASX and its description in the first line. Click on this line, and press Create. For version 4.x, expand the tree of segments, and place the cursor on E1KNVKM.
You will see a pop-up screen. Enter E1KNVKM as the reference segment. Enter.
For 4.x, press Create after placing the cursor on segment E1KNVKM.
You will see a line appear with E1KNVKM hierarchically below ZDEBMASX, with a description "Customer Master contact person (KNVK)."
Click on this line and press Create. You will receive a message indicating that the new segment being created will be a child segment of E1KNVKM. Enter. A pop-up box appears for the new segment.
Enter Z1SADRX as the segment type, 1 for Minimum, 1 for Maximum. Leave Mandatory segment unchecked. These entries imply that there is only one Z1SADRX segment for every occurrence of the E1KNVKM segment, and also that this segment is not mandatory. Note that if the parent segment is not mandatory, then the child segment should not be mandatory, because this could result in a syntax error during the creation or processing of the IDOC.
For 4.x, you must first create the IDOC segment Z1SADRX (Iâll explain why in a moment) from the menu path WEDI -> IDOC -> Development -> IDOC Segment.
Click on Segment Editor.
On the next screen, click on Create.
Enter a development class for the object. Enter.
This will take you to the screen for segment definition. Enter a description for the segment. Enter the field name, data element, and the data element documentation name. In most cases, all three fields may have the same values. If you are using a field in the segment that is not present in the ABAP/4 data dictionary, you must first create the domain, data element, field, and appropriate documentation before using it in the new segment.
Enter these three columns for all 12 fields. Save.
Click on Generate/Activate, F3 to step back.
From screen Maintain Segment, go to Segment Type -> Release. A checkbox now appears beside the segment definition Z1SADRX (see Figure 2). Check this box. Save. Save again to store the descriptions of the segment, F3 to step back.
Save the extension type.
It is possible to have several new segments with relevant Basic IDOC type parent segments in a single extension type. However, you can form only one IDOC type based on a single extension type.
Pls reward helpful points.
Regards,
Ameet -
Hi experts,
I am given a task to create an out bound IDOC which would be input to TIBCO, which must be triggered every time Good issue transaction is completed by either VT02N or VL02N transaction up pressing SAVE.
IDOC is to have fields from Customize tables apart from standard SAP tables, so was asked to create an own IDOC ( eg: Z--Idoc).
Please tell me how to create the idoc, and also the method to trigger it and how to populate the IDOC ( program etc).
Use full inputs would be promtly rewarded.
Regards,
Ram.Hi
Creation of Custom IDOc type and message Type
First Create Partner Profile(WE20 Tcode) and Port Definition in WE19 Tcodes.
take the Basis help to create them.
1.First create segments in WE31 Tcode with the required dataelements
2.Create the Basic Idoc Type in WE30
release the Segments and IDOC type.
3.Create Message type in We81
4.Assign the message type to IDOC type in WE82 T code
5.Create the process code in We41 (for Outbound) WE42 (for Inbound)
6.Create A fun module in SE37 starting with ZIDOC_OUTPUT_.. by copying some Inbound (for Inbound) Outbound Fun module
7.Create Workflow setting if needed ..
8. Assign the fun module to Idoc Type, Message Type and WF object (if it is there0
9.Define setting for fun module in BD51
10.In BD51 Define the settings for Fun module..
10.Assign the Processs Code to Fun mod`ule
Outbound Interface
PROCESS DIAGRAM for Outbound Interface
1. Analyse Hierarchy Levels
2. Create New segment
3. Create New IDoc Type
4. Create New Message Type
5. Link Message with IDoc Type
6. Create an entry in EDP13 via transactions WE20 and BD64
7. Populate the Custom IDoc via ABAP Program
7b Error Handling
7c. Send Status Email
8. Test the Population of the Custom IDoc
Step 1 Analyse Hierarchy Levels:
Analyse the data relationships being processed in the interface. Define the appropriate hierarchical Parent-to-Child relationships.
Navigate to transaction code WEDI
Transaction WEDI displays the IDOC main menu. This allows navigation around the various development and control areas to create a customised IDOC.
Step 2 Create a new segment:
via wedi : Development - IDOC Segments or Transaction code WE31.
Enter segment name and click on Create.
? The name of the segment type must start with Z1 , and have a maximum of eight characters.
Enter description and enter the relevant field names and data elements.
? The segment should represent a structure in the program so for each field in the segment a field name and a data element must be defined.
Save the segment and enter Person Responsible and Processing Person .
Go to Edit and Set Release.
Repeat this procedure for each new Segment in the IDOC.
Step 3 Create a new IDOC Type
via wedi Development - IDOC Types or Transaction WE30.
Enter segment name (starting with Z), click on Basic Type and then Create.
Create as new, enter Person Responsible and Processing Person and enter description.
On Create Basic Type screen decide where segments should be inserted and go to Edit/Create Segment.
Complete relevant fields in the Maintain Attributes screen:
From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a Child.
When IDOC created return to initial screen. Go to Edit and Set Release.
Go to Transaction WE60 to view the IDoc Type you have created.
Step 4 Create new Message Type
via wedi Development - Message Types or Transaction WE81.
Display/Change and click on New Entries
Create a new Message Type and Save.
Step 5 Link Message Type to IDOC Type
via wedi Development - IDOC Type/Message or Transaction WE82.
Display/Change and then click on New Entries.
Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
Step 6 Create an entry in EDP13 via transactions WE20 and BD64.
The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
WE20 Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
BD64 Create a Model View, Enter Sender and Receiver Ports, Attach Message Type. Go to Environment on Menu and click on Generate Partner Profiles and generate (not save) profile.
Step 7 Populate the custom IDOC via ABAP Program
See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
The control record is filled into a structure like EDIDC. The message type and the Idoc type for the Idoc must be populated into the eddic structure.
- PERFORM populate_Control_structure USING c_mestyp
c_SEGMENT_type1.
The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
- PERFORM transfer_Parent_data_to_seg.
The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
- PERFORM master_idoc_distribute.
NOTE: This function module is only called for stand alone programs and Shared Master Data programs (SMD). It is not called when using extensions or output determination.
The ALE Layer handles the sending of the IDOC to the receiving system.
Error Handling (see Step 7b).
Commit work.
Project Specific
Step 7b Error Handling Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
Declare a structure of type MCMAILOBJ for sending instructions.
Enter values for the internal table based on structure MCMAILOBJ
For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module MC_SEND_MAIL.
Enter values in the following parameters: -
MS_MAIL_SENDMODE = B (Batch Mode)
MS_MAIL_TITLE = 'Mail Title'
MS_MAIL_DESCRIPTION = Error description (e.g. MATNR not given)
MS_MAIL_RECEIVER = Name of Receiver (To be determined)
MS_MAIL_EXPRESS = E (Express Delivery)
MS_MAIL_DLINAME = Leave Blank
MS_MAIL_LANGU = 'E' (Language)
MS_MAIL_FUNKOBJ_NAME = Leave Blank
TABLES
MS_MAIL_CONT = I_MCMAILOBJ
Note:
It has to be determined separately for each interface how these errors and mail notifications are to be grouped dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
Step 7c Send status mail
Append to table I_MCMAILOBJ details of the time the interface was processed, how many Idocs were created and how many of these produced a status of 03.
Select the user to receive the mail from ZINT_RECEIVER, using the name of the program as a key (SY-CPROG).
Use function Module MC_SEND_MAIL to send a mail to the user containing the contents of I_MCMAILOBJ at the end of the interface processing.
Step 8 Test the population of the custom IDOC
via wedi IDoc - Display IDoc or Transaction WE02.
Enter your message type and execute.
Status should be green, double click on one of the Idocs you have created to view its contents.
If a problem has occurred click on Status which will give you a description of the error.
Drop down Data Records arrow and this should list the data in the IDoc in the correct hierarchical structure.
Click on each individual segment and view the content to check that the correct data has been read.
If you have UNIX access by using AL11 you can view the file that you have created.
Note:
For some interfaces it may be valid to send an empty file to SAP. This empty file is converted to the custom IDOC format expected by SAP. This custom IDOC will contain dummy information. In the inbound processing code, if the dummy information is identified then the processing of the IDOC is considered to be complete and the IDOC should then be assigned a successfully processed status of 53, even though it has not been processed at all.
Regards
Anji
Maybe you are looking for
-
Is there anyway to transfer purchases from one Itunes account to another?
So I have had an itunes account since I was about 13. So the email I used for it was a really old one. I'm older now and I have a new email account that I used for everything. I don't check the old one, and I may forget the password to the old email
-
I can't get the App Store in English because I'm based in France
If I change the country of residence to Ireland, then it tells me I cannot use my account to buy stuff. If I keep the French version, it shows me the french preferred apps first.
-
Always open in new window?
Is there any way to always make a certain type of link in a new window? Perhaps through a grease monkey script?
-
Ichat not showing up for texting other iphone owners?
Hi i added friends that own iphones as well and some when i text them so ichat and other do not? just wondering why??? does it have to do with the model of the iphone??
-
Hi Is it possible to use SDHC (High Capacity) card with time machine? or if my MacBookPro SD slot support SDHC card? My mac is a MacBookPro with Snow Leopard. The card i want to use is this: http://www.sandisk.com/microsites/extremeteam/index.html Sa