Creation of Posting Programs

Hello Everyone,
Can anyone tell me as to how a posting program is create in ALE IDOC.As we have predefined posting program like BD10,BD11 etc.How do we create one for the custom made IDOCS.I expect a speedy response.
Thanking you in advance.
Regards,
Sirisha.

Create new segments -- WE31
Create new IDOCs -- WE30
Create a new message type -- WE81
Link message type with IDOC type -- WE82
<b>Outbound program LOGIC</b>-<b><u>Posting program</u></b> with example
Select data from application tables
Fill data into IDOC
Pass IDOC to ALE layer
(Call function MASTER_IDOC_DISTRIBUTE)
Commit Work
REPORT zale_example.
Parameter for material number for getting related information
PARAMETER : s_matnr TYPE matnr.
Internal table for populating the control information for the IDOC
DATA : i_edidc TYPE STANDARD TABLE OF edidc INITIAL SIZE 0
WITH HEADER LINE.
Internal table for the communication control record
DATA : i_c_edidc TYPE STANDARD TABLE OF edidc INITIAL SIZE 0
WITH HEADER LINE.
Internal table for the populating the data record
DATA : i_edidd TYPE STANDARD TABLE OF edidd INITIAL SIZE 0
WITH HEADER LINE.
Structure for the storing material related information
DATA : struct_mara TYPE mara.
Structure for the storing the material description
DATA : struct_makt TYPE makt.
Structure for the segment to populate the record in the data record
DATA : struct_e1maram TYPE e1maram.
DATA : struct_e1maktm TYPE e1maktm.
Constants for the segment names.
DATA : c_e1maram TYPE edilsegtyp.
DATA : c_e1maktm TYPE edilsegtyp.
START-OF-SELECTION.
Get the application data from the tables MARA and MAKT
PERFORM get_app_data.
Populate the idoc.
PERFORM pop_idoc.
*& Form GET_APP_DATA
Get the Application data from the MARA and MAKT
FORM get_app_data .
Get the Material related information from the mara.
SELECT SINGLE *
FROM mara
INTO struct_mara
WHERE matnr = s_matnr.
Check for the sy-subrc value
IF sy-subrc NE 0.
Sy-subrc is not equal to zero go out of the program.
EXIT.
ENDIF.
Get the material description from the makt by using matnr
SELECT SINGLE *
FROM makt INTO struct_makt
WHERE matnr = s_matnr.
Check for the sy-subrc value
IF sy-subrc NE 0.
Sy-subrc is not equal to zero go out of the program.
EXIT.
ENDIF.
ENDFORM. " GET_APP_DATA
*& Form MOVE_TO_E1MARAM
populate the segment E!MARAM
FORM move_mara_to_e1maram .
Clear the segment
CLEAR struct_e1maram.
Pass the message type related information into the segment.
MOVE: "STRUCT_MARA-MSGFN TO STRUCT_E1MARAM-MSGFN,
struct_mara-matnr TO struct_e1maram-matnr,
struct_mara-ersda TO struct_e1maram-ersda,
struct_mara-ernam TO struct_e1maram-ernam,
struct_mara-meins TO struct_e1maram-meins.
Populate the internal table for the data record by passing the
Segment name and application data.
PERFORM pop_idoc_edidd USING c_e1maram struct_e1maram.
ENDFORM. " MOVE_TO_E1MARAM
*& Form MOVE_MAKT_TO_E1MAKTM
Populate the segment E1MAKTM
FORM move_makt_to_e1maktm .
Clear the segment
CLEAR struct_e1maktm.
Pass the message type related information into the segment.
MOVE : "STRUCT_MAKT-MSGFN TO STRUCT_E1MAKTM-MSGFN,
struct_makt-spras TO struct_e1maktm-spras,
struct_makt-maktx TO struct_e1maktm-maktx.
Populate the internal table for the data record by passing the
Segment name and application data.
PERFORM pop_idoc_edidd USING c_e1maktm struct_e1maktm.
ENDFORM. " MOVE_MAKT_TO_E1MAKTM
*& Form POP_IDOC_EDIDD
Populate the data record by passing the segement data
-->P_C_E1MAKTM segment name
-->P_STRUCT_E1MAKTM Application data
FORM pop_idoc_edidd USING p_c_e1maktm
p_struct_e1maktm.
Clear the work area for the data record internaltable I_edidd
CLEAR i_edidd.
Move the segment name
MOVE: p_c_e1maktm TO i_edidd-segnam,
Pass the application data
p_struct_e1maktm TO i_edidd-sdata.
Append the internaltable.
APPEND i_edidd.
ENDFORM. " POP_IDOC_EDIDD
*& Form POP_IDOC
Populate the Idoc with related information
FORM pop_idoc .
populate the control record
PERFORM pop_con_data.
populate the data record by first populating the header segment
PERFORM move_mara_to_e1maram.
Populate the data record by populate the data segment
PERFORM move_makt_to_e1maktm.
call the fM master idoc distribute for creating master idoc
PERFORM create_mat_idoc.
ENDFORM. " POP_IDOC
*& Form POP_CON_DATA
Populate the control record
FORM pop_con_data .
Variable for the logical system name
DATA: l_logsys TYPE edi_sndprn.
Get the logical system name.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = l_logsys
EXCEPTIONS
own_logical_system_not_defined = 1
OTHERS = 2.
Check for the sy-subrc value
IF sy-subrc NE 0.
Sy-subrc is not equal to zero go out of the program.
EXIT.
ENDIF.
Clear the work area of the control record
CLEAR i_edidc.
Move the partener type to the control record
MOVE : 'LS' TO i_edidc-sndprt,
Populate the sending system name
l_logsys TO i_edidc-sndprn,
Populate the type system partener used
'LS' TO i_edidc-rcvprt,
Populate the partner number
l_logsys TO i_edidc-rcvprn,
Populate message type
'MATMAS' TO i_edidc-mestyp,
Populate the idoc type.
'MATMAS03' TO i_edidc-idoctp.
Append the control record data.
APPEND i_edidc.
ENDFORM. " POP_CON_DATA
*& Form CREATE_MAT_IDOC
Call the FM MASTER_IDOC_DISTRIBUTE
FORM create_mat_idoc .
Call the FM MASTER_IDOC_DISTRIBUTE for passing the IDOC to ALE layer.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
master_idoc_control = i_edidc
TABLES
communication_idoc_control = i_c_edidc
master_idoc_data = i_edidd
EXCEPTIONS
error_in_idoc_control = 1
error_writing_idoc_status = 2
error_in_idoc_data = 3
sending_logical_system_unknown = 4
OTHERS = 5.
Check for the sy-subrc value
IF sy-subrc NE 0.
Sy-subrc is not equal to zero go out of the program.
EXIT.
ENDIF.
ENDFORM. " CREATE_MAT_IDOC

Similar Messages

  • Outbound idoc posting program Creation

    Hi,
    i want to create a posting program for my new idoc/segment, can anybody give some standerd posting program.

    HI,
    use FM: IDOC_OUTBOUND_WRITE_TO_DB
    Fill int_edidd with your IDoc Data and int_EDIDC with the IDoc control.
    maybe it´s useful!

  • AFAB dynamic variant creation for Posting period.

    HI,
    Business Requirement :
    Business want to run AFAB transaction code every month automatically with schedule job.
    system should pick present month period in posting period field.
    i checked in variant creation  against posting period there is no dynamic " D " in selection variable column.
    how can i fix this.

    Hi Jani,
    Check with abaper if TVARV table can Help you in this case, or create a z program from AFAB. And add date field to it, and schedule job based on that,
    I think TVARV table will be a better approach.
    Another point to consider here would be that dep should be run once business is ready to do so, and has its own hick ups in business if corrections are required to be made after executing AFAB by job
    Regards
    Pankaj B.

  • Travel Expense - Posting run error - Error during creation of posting run

    Hi Guru's,
    Look forward for your insights. Here you go with my question.
    We are implementing Expense Mgt with Portal with out scope for payroll in SAP.  I have set up Expense type, WT, Symbolic A/c to G/L Accounts. Im performing Unit testing currently.
    Created Expense trip in ESS, from R/3 tcode PRAP, have approved trip, and settled through Tcode - PREC.
    When I try to create posting run under transfer to accounting, I get following error
    Error during creation of posting run number (->PR1
    Message no. 56840
    I'm not sure why this error was popping up. Appreciate your suggestion.
    Regards
    Praveen.N

    Hi,
    Since you are trying to make payment through FI, you need to maintain ur employee as Vendor. You can do it through PRAA.
    So while creating posting run for this trip, it checks if the respective Vendor for this employee is maintained or not.
    Pls maintain it as vendor and see if the errors are still coming.
    Rakesh

  • Posting Program for Incoming Invoice

    Hello,
             I have a requirement to develop an Inbound Interface for Incoming Vendor Invoice which needs to be posted into SAP. Is IDOC_INPUT_INVOIC_MM the Posting Function Module which is used for this Purpose? Or do I need to develop a Custom Posting Program for Posting Invoices in MIRO? Please suggest the available BAPIs & FMs for MIRO Transaction if I need to go for a Custom Development.
    Thanks,
    Venkata Phani Prasad K.

    Hi,
    The posting program for Posting an Vendor Invoice is IDOC_INPUT_INVOIC_MRM which is associated with the process code INVL.
    I have used the above FM only to post the Vendor invoice idocs and it was successful.
    Thanks,
    Mahesh.

  • Payment Posting Program - PC00_M99_PPM

    Hi Guys,
    Can anyone please explain the use of Program "H99_POST_PAYMENT" (Payment Posting Program - PC00_M99_PPM)?
    Also how is this program different from Traditional Posting Program (RPCIPE00 / PC00_M99_CIPE)? Can someone explain from
    accounting point of view?
    Thanks,
    Sanjeev

    Program "H99_POST_PAYMENT
    Purpose
    All payments are posted automatically with this report.
    Features
    If you have performed posting to Accounting (FI/CO), all open liabilities from Payroll are placed on the relevant liabilities accounts accounts, as well as the payments to employees.
    In the standard system, as the payment medium is created for the payments to employees from HR, the system does not mechanically generate the corresponding liabilities accounts. Neither the DME preliminary program (programs RPCDTAx0, or RPCDTCx0 and HxxCDTC0, or RPRDTAx0 ) or the program for creating the data medium (programs RFFO*) perform posting in the FI general ledger. Therefore, if the system in HR generates the payment mediums for payments to employees, you must also perform manual postings in parallel. These manual postings are usually performed with the payment summary. In most cases, there is only one posting containing only a few posting items, that is, one posting item for each bank clearing account and each company code involved.
    If, however, the liabilities are distributed according to expenses, more posting items are generated. You can no longer perform posting manually.
    Selection
    With the report H99_POST_PAYMENT, all payments are evaluated regardless of whether they have been paid or not. All wage types included in table BT and table T52POST_PAYMENT count as payments.
    RPCIPE00
    This program is used to post the payroll results to accounting/FI.
    All wagetypes which are configured to the respective GL accounts using the symbolic account are simulated and the documents so generated using this reported are then executed thru PCP0 to have the values posted to the General Ledger.
    Thanks and Kind Regards
    Ramana

  • Tool creation for checking program of ABAP in TXT format with the ABAP stds

    Tool creation for checking program of ABAP in TXT format with the ABAP stds

    Hello Jagrut
    There is a simple reason why we cannot do off-line ABAP development:
    - the <b>ABAP dictionary</b> (which contains all structures, tables, data elementes, etc.)
    Because even the simplest ABAP report (except for the "Hello World" report) will reference some objects from the ABAP dictionary and, thus, requires to access these objects directly. Therefore, we are still bound to server-side ABAP development.
    Regards
      Uwe

  • Posting Program needed

    Dear All,
    1) Can anyone tell me if there is any Standard Posting Program to Post IDOC DELVRY03 from SAP to other external System. If there is no Standard program, Can any one let me know any Function module which can help me post IDOC DELVRY03.
    2) Do anyone know about transportation planning point. How this needs to be Set for External Systems?
    Thanks in advance,
    Aarti

    Hello Ravi,
    Thanks for your quick reply
    But I don't want to use FM :IDOC_OUTPUT_DELVRY as this would want me to create a output type to initiate the NAST table required for the FM
    Is there any standard transaction to Send Deliveries through IDOC DELVRY03 or any other FM which doesn't require to fill NAST table.
    I checked WE64 as well, it links me to same FM :IDOC_OUTPUT_DELVRY as processing routine.
    Regards,
    Aarti

  • Posting program

    hi,
       how to Create a custom function module (posting program) which checks the credit limit for the sold to party for the outbound idoc.
    ganesh

    Hi,
    custom(er) function modules are used in enhancements.User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    <b>Reward points</b>
    Regards

  • IDOC Posting Program for Vendor Master

    Hi Guys,
    Please give me the Sample Posting Program Vendor master Idoc.
    Thanks a lot in advance.
    Prabhu.r

    search with BD* in SE93
    BD14 - Outbound program for vendor master
    BD10 - Outbound Material master
    BD12 - Outbound customer master

  • Idoc inbound posting program for CRMXIF_PARTNER_SAVE_M02

    Hi Abapers,
            Im working on datamigration for Business partner using Lsmw idoc method and getting Idoc status 53 with message crmxif_partner_save function module generated successfully with BP number but some of the entries of the fields is not getting inserted into master table BUT000,can any one put a tip of light what exactly is going wrong as i have taken all necesscary steps if any one can share their views like how to trace the posting program for inbound idoc crmxif_partner_save_m02 and where exactly the data is getting inserted into database table BUT000.
    Will  appreciate all your help.

    Hello,
    at first, that would be very useful if you could say which fields/segments exactly are not transfered...
    there can be lot's of reasonsd why the fields are not inserted with 53 result status, but in general you can try several points:
    1. check if all the fields you want to transport are properly mapped
    2. you can try to debug, if indeed your mapping rules are working during convertion
    3. do you want to fill this fields in insert (to create new BP) or update mode (udate already created BP)?
    etc.
    regards,

  • Idoc (posting program)

    what is the posting program in idoc and what is the message type give me the exact definitions?

    Hi Kiran,
    The posting program in the mapping program which is used to do the mapping between the message types.
    Check out the following links for further understanding of IDocs:
    /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Regards,
    Archana

  • Posting programs

    Hi,
    What are the posting programs are available in ALE IDOC?
    and also how to find out the status of the idoc ?
    Regards
    Ramesh Baskaran

    Tcode: WE05 gives the status of IDOC
    table TEDS1 for all IDOC status and their descriptions
    The following table describes outbound IDOC status codes that generate Tivoli Enterprise Console events:
    Outbound IDOCs
    Code Error Event Severity SAP Meaning
    02 Yes Error Error passing data to port
    03 No Error if transaction SM58 indicates an RFC transmission error Data pass to port OK
    04 Yes Error Control information of EDI subsystem
    05 Yes Error Translation
    06 No Harmless Translation
    07 Yes Error Syntax check
    08 No Harmless Syntax check
    09 Yes Error Interchange handling
    10 No Harmless Interchange handling
    11 Yes Error Dispatch
    12, 13, 14 No Harmless OK
    15 Yes Warning Interchange acknowledgement negative
    16 No Harmless Functional acknowledgement
    17 Yes Warning Functional acknowledgement negative
    18 No Harmless Triggering EDI subsystem
    20 Yes Error Triggering EDI subsystem
    22 No Harmless Dispatch OK, acknowledgement still due
    23 Yes Error Retransmission
    24 No Harmless Control information of EDI subsystem
    25 Yes Warning Processing despite syntax error
    26 Yes Error Syntax check
    27 Yes Error ALE error
    29 Yes Error Error in ALE services
    30 No Harmless Ready for dispatch (ALE)
    31 No Harmless IDOC is marked for deletion
    33 No Harmless Original of an IDOC which was edited
    34 Yes Error Error in control record of IDOC
    36 Yes Error Timeout error; electronic signature not performed
    37 Yes Error IDOC added incorrectly
    38 No Harmless IDOC archived
    39 No Harmless Receive confirmed
    40 Yes Error Application document not created in target system
    41 No Harmless Application document created in target document
    Reward points if useful.

  • GL posting program works differently in production and QA system?

    Hi Experts,
    I got a strange error when I copy a personnel from production to QA to test the posting. The employee has retro calculation back to period 1 of 2010. The GL posting program RPCIPE00 only picks up the original record in 01.2010 (the P record) in QA system and so gives an unbalancing error. But in production when I do a simulation with GL posting I can see in the log that it picks up both P and A result and there is no error.
    What could cause the inconsistency of this program?
    Thanks a lot.
    Allan

    Is payroll run is same manner in both system, could you see all results are exactly same in both system and there is no changes.
    Manoj Shakya

  • What is the posting program and what kind of it is?

    HI,
    what is the posting program and what kind of it is?

    Hi,
    I am not sure in what context you are talking about. In case of a IDOC, there will be a function module which picks the data in the IDOC and posts the same to the respecitve application.
    If you require more details explain the context of the same.
    Regards,
    Ravi
    Note : Please close the thread, if the question is answered

Maybe you are looking for