ABAP programming q?

I am new to this language.  i need to write a routine.
I have two infoCubes, both are identical but for 0Calmonth and 0CalDay
i need to add and pool daily historic data to monthly bucket when 9amatnr and customer is same.
how do i declare this infocube structure and assign it to that variable.
how do i access the members of the infoCube?
Thanks
Steve

Hi Steve,
I think you should post your query  /community [original link is broken].
regards,
Atish

Similar Messages

  • Is it possible to call ms-dos command in abap program?

    Hi,
    is it possible to call ms-dos command in abap program?
    Thanks.

    Hi Cemil,
    You probably have your answer here:
    [Re: DOS/Windows command in app server;
    You create your external command with SM69 (you can test it with SM49).
    Then you call this command with function module "SXPG_COMMAND_EXECUTE".
    (See function group SXPT for all the calls to external commands).
    Regards,
    Thomas

  • Can we use is null in our select statement in ABAP program

    hi,
    I want to use 'is nul' or 'not null' in select statement of my ABAP program for any field. I have written below query but I am getting sy-subrc = 4 and getting no data. Can anyone resolve this.

    Hi,
    I think you've posted your question on the wrong forum. This is the SAP Business One development forum which is not part of ERP and doesn't include any ABAP or Netweaver programming.
    For a list of forums please see here:
    http://forums.sdn.sap.com/index.jspa
    Kind Regards,
    Owen

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • How to get a parameter from BPC and use it in ABAP program

    Hello gurus!
    I got a problem...
    SAP BPC will send parameters such as year, division, category, company code and so on via script logic to SAP BW.
    I need to get these parameters from BPC and use them in a ABAP program as a filter.
    This ABAP program will do several routines and return new values to BPC. It must be made on ABAP and I need to filter data to avoid performance issues.
    Does anybody knows how to do it? or have a example of it?
    Thank you in advance.
    Regards,
    Rubens Kumori

    Hello, I'm looking for a suggest.
    I need to pass two parameters (users can input them in a data manager package in bpc) to a BAdI.
    In this BAdI I write a code that store those parameters in a InfoObject.
    The problem is:
    - one parameter is for CATEGORY value. CATEGORY is a dimension of the application and I read the value with a code like this:
          READ TABLE it_cv INTO l_s_it_cv
               WITH TABLE KEY dim_upper_case = 'C_CATEGORY'.
    - other parameter is a generic DATE. this parameter is not a dimension of the application and I don't know how I can retrieve this value in BAdI.
          READ TABLE it_cv INTO l_s_it_cv
               WITH TABLE KEY dim_upper_case = '.....'.
    The data manager dynamic script is:
    PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%")
    PROMPT(TEXT,%SELECTED_DAY%,"Write the date (format YYYYMMDD)",)
    I also have a dynamic constant that assign the name %CATEGORY_DIM% to "C_CATEGORY" value.
    Can anyone help me?
    thanks a lot
    Edited by: Luca Novali on Feb 13, 2012 3:49 PM

  • How to copy/download  all ABAP programs in a text with a single report  ?

    How to copy/download  all ABAP programs in a text format with a single report/TC  ?
    How to copy/download  ABAP source code with all include programs ?....
    we need to search & copy all include programs everytime....

    Hi,
    check this link
    downloading programs
    Regards

  • How To Call a Broadcasting Template within an ABAP program

    I was wondering if anyone knew how to call the Broadcast template via an ABAP program so it will execute?  The scenario that I have is we are doing validations via BW.  We put the data (for conversion reasons) through validation rules and then load a data target.  From this, there are 2 situations that could occur:
    1) There are errors
    2) There are not any errors
    If #1 is true, then I would like to execute the Query Broadcasting Template that I have created.  If #2 is true, then I would like to execute another process via the ABAP program.  In the past, I was successful using exception reporting via reporting agent, since I was able to call that program but the report did not look good at all.  Please let me know if there is a program that I could call in order to execute this broadcast that I have set up.
    Best Regards,
    Tim

    Hello,
    although this is an old threat, but do you have any hints on how to dynamically change the template when broadcasting?
    kind regards
    Murat

  • Sometimes RSCRM ABAP program is taking much time

    Hi,
    I am working in SAP BW 3.1 system. We have one RSCRM Abap program to send the data to Data stage team.
    We kept this process in process chain. Some times it takes much time. If i cancel that job and repeat this process it will complete in few minutes.
    Please suggest me what would be the reason.
    Thanks

    You may want to take a look at the following OSS Notes:
    [OSS Note 605213 - RSCRM: Performance|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=605213]
    [OSS Note 989461 - RSCRM:code for improving performance in VALUES_READ|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=989461]
    [OSS Note 1137302 - RSCRM: Memory usage optimization|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1137302]

  • Triggering Event in BW through a ABAP Program in R/3

    Hello Friends,
    I am working on triggering a process chain in BW using ABAP program in R/3.
    1.  I have created a test process-chain in BW which sends test email upon running. This process chain is triggered by an event "Z_START_PC".
    2.  I created a function module "ZBW_EVENT_RAISE" which triggers this event.
         ( This function module is "remote enabled module")
    3.  I tested running the process chain, with function-module (SE37), which works fine.
         ( i.e. I do receive test-email after..)
    4.  Now I created a ABAP program "ZBW_EVENT_RAISE" in R/3.
         The code of which is as follows:
         REPORT  ZBW_EVENT_RAISE.
        parameters: rfcdest like t000-logsys.
        parameters: bwevent like tbtco-eventid.
        call function 'ZBW_EVENT_RAISE'
        destination rfcdest
         exporting
         eventid = bwevent.
    5.  When I try to run this ABAP program in R/3 (SE38),
         The process chain does not get triggered.
      (a)  The "<b>rfcdest</b>" i got from SM59 - RFC Destinations -
            R/3 Connections - BW Development Server Client
            Value is "BWDCLNT999".
    How do I go about debugging this issue? I know for sure, the BW- function module -- to Trigger -- to Process-chain is working fine. Only part is R/3 to B/W function module starting.
    Any help is appreciated.
    I promise to award points.
    Thanks
    PK

    in ST05 there is an option for RFC trace. Not sure how much detail that will give you but you can try.
    It is possible that your userid doesn't have an RFC call authorization in R/3. Do a SU53 immediately after running the program.
    Also, replace the FM with any other FM that you know for sure runs  (eg some BAPI FM) and run it - either in SE37 in R/3 with RFC destination for BW, or, from your code itself and see if that works (you can check return code).

  • How can user attach file to interactive form, and be read by abap program?

    Hello,
    I created an abap interactive form, sent to the user, then user fills out the form fields, then it is uploaded back to sap, then my program reads this data and process it.
    It works.
    Now I want users to be able to attach any file they want, and the abap program to extract this file out of the PDF, to put it into SAP (or anywhere).
    I succeeded in attaching a file, I can "see" it via function module get_annotations, but I get the file in compressed form by Adobe (filter="FlateDecode").
    Do you know how to unzip the file, or is there another way to attach files in adobe reader/extract them via abap?
    I use acrobat reader 8.1.2
    Thx a lot!
    sandra
    Below is the xml obtained by GET_ANNOTATIONS. We see that there are other text annotations, and that the attached file has {length="98005"}, though real file (before "attach file" to the PDF, and also after "detach file") has length 111 995 bytes. It's why I deduced that there is a compression (I also tried to extract it as-is and open it with adobe but it doesn't work.
    <?xml version="1.0" encoding="UTF-8"?>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
      <annots>
        <highlight rect="212.347,624.257996,252.979004,636.539978" creationdate="D:20080604100938+02'00'"
    name="2114308b-275d-4eca-8bfc-c8288ef4a77c" color="#FFFF00" flags="print"
    date="D:20080604100938+02'00'" title="mtresori" subject="Texte surligne "
    coords="215.432999,636.179016,249.893005,636.179016,215.432999,624.619019,249.893005,624.619019"
    page="0">
          <popup rect="595.276001,516.179016,775.276001,636.179016" flags="print,nozoom,norotate"
    open="no" page="0"/>
        </highlight>
        <fileattachment rect="15.345001,802.841003,29.345001,822.841003"
    creationdate="D:20080604101011+02'00'" name="f6e12648-c9b0-4cd1-b08b-82876c8300d7"
    color="#4055FF" flags="print,nozoom,norotate" date="D:20080604101019+02'00'" title="mtresori"
    subject="Piece jointe" file="SAP_WIDGETS2.pdf" mimetype="application/pdf"
    creation="D:20080603112937+02'00'" modification="D:20080603112937+02'00'" size="111995"
    checksum="9F846412B510089F7C6DBCC6527C6339" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>SAP_WIDGETS2.pdf</p>
            </body>
          </contents-richtext>
          <data MODE="raw" encoding="hex" length="98005" filter="FlateDecode">
    4889CC570B5414D719F651A38EC468D5C6A2980104E528BBF3B8F3B2626405242920020A0AA4AEBB
    C3B2BAECEAEEA2A018030A628C8FFA4A0F568F58426A1EF5118FB5266A8D9AA2B16A55044541C5
    A62656EBA315935AE8BDB3BBEC2C0BD9D5B39EB3671966FEFBFCE6BF
    ETC. (all hexa code is the attached file, but with compression by adobe)
          </data>
        </fileattachment>
        <text rect="96.187408,680.099976,116.186996,698.099976" creationdate="D:20080613144537+02'00'"
    name="73360fcf-f5e5-4d5b-9315-fe4c42924300" color="#FFFF00" flags="print,nozoom,norotate"
    date="D:20080613144617+02'00'" icon="Comment" title="srossi" subject="Note" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p dir="ltr">
                <span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;
    font-weight:normal;font-style:normal">
    ffffffffffffffffffffff
                </span>
              </p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,578.099976,775.276001,698.099976" flags="print,nozoom,norotate"
    open="yes" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144627+02'00'" state="Marked"
    name="d524b7d5-1a85-4b62-80b3-5875dd152c51"
    color="#FFFF00" flags="hidden,print,nozoom,norotate" date="D:20080613144627+02'00'"
    icon="Comment" title="srossi" subject="Note"
    inreplyto="73360fcf-f5e5-4d5b-9315-fe4c42924300" statemodel="Marked" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Marked definie par srossi</p>
            </body>
          </contents-richtext>
          <popuprect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144633+02'00'" state="Accepted"
    name="88af2cb6-7516-4f21-81e6-97edc7a85184"
    color="#FFFF00" flags="hidden,print,nozoom,norotate" date="D:20080613144633+02'00'" icon="Comment"
    title="srossi" subject="Note" inreplyto="d524b7d5-1a85-4b62-80b3-5875dd152c51" statemodel="Review"
    page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144642+02'00'" state="Marked"
    name="a8c6b485-c3f9-44e2-ad53-c61b2766d9d5" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144642+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="f6e12648-c9b0-4cd1-b08b-82876c8300d7" statemodel="Marked" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Marked definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144647+02'00'" state="Accepted"
    name="0136b689-575c-46b8-a21a-86e3c8d73904" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144647+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="a8c6b485-c3f9-44e2-ad53-c61b2766d9d5" statemodel="Review" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144657+02'00'" state="Accepted"
    name="a21fc3c5-cf6a-4c6f-bc1f-328a91050b4e" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144657+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="2114308b-275d-4eca-8bfc-c8288ef4a77c" statemodel="Review" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
      </annots>
      <f href="acTempF-00000028453-00000000089"/>
      <ids original="03473EFED11DB2110A00000000000000" modified="959796E85292D54DB7FA558CAAD4A346"/>
    </xfdf>

    Hello everybody,
    I am sure you have an answer to my question above. It was :
    how is it possible for a user to ATTACH files to a PDF interactive form, and then be able to READ them via a program ? (I guess the solution to read them via ABAP or JAVA is quite the same?)
    Thx a lot !
    sandra

  • Schedule Jobs with multiple steps via ABAP Program

    Hi,
    I need to schedule multiple programs via background jobs on a daily basis. Since all these jobs are to be run as a single job, the various programs have to be run as steps in a major job.
    I am however not very clear on how this can be done via an ABAP program ( the idea of a program is that various parameters to be passed to each program in the step can be entered dynamically rather than via variants).
    I am using the JOB_OPEN and JOB_CLOSE functions and submitting the programs with selection screen parameters dynamically passed to create a job. I need to do this for various programs as a job step (WITHOUT Variants being defined).
    Can anyone suggest any ideas for this? I have tried out JOB_SUBMIT Function but am not very confident I know what exactly it is for as it asks for a variant.
    Thanks very much,
    Preet

    Hi Preet,
    just to be sure: you know, that variants can be dynamical, too?
    It's quite usual to assign dynamical current date, but it's also possible to add / subtract value and even define own functionality.
    Maybe it's easier to implement a dynamical selection and handle static jobs.
    If you try to plan a job (online or with JOB_SUBMIT), you have to use variants - you can create (or change) them dynamical in beforehand. Only SE38, F8, F9 is creating a temporary variant, so that no saved variant is necessary.
    But if you end up creating variants dynamical, you can change one existing variant, too. Then you can use a static job definition (with periodical starting rule).
    So: have a look, if dynamic variants are enough, otherwise change variants per job.
    Regards,
    Christian

  • How can i print data in smartforms from ABAP program.

    Dear gurus:
    in my abap program i process require data, and saved in a internal table.
    how can l print the data in smartforms.?
    who can give me a code sample is better:)
    reward all helpful advise.

    Try this....
    1) Tcode --> SmartForms
    2) Form name --> Z_SF_TEST Create
    3) Under Global settings
    a) Form Interface  
        Table Tab
       ITAB LIKE EKPO
    b) GLOBAL Definitions
    WA_NETPR LIKE EKPO-NETPR
    In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields
    For that we have to create an extra variable in global definitions
    Ex: netpr FIELD of EKPO
    CREATE program lines and specify WA_NETWR = itab-netpr.
    4) RT CLick on main Window
       CREATE --> TABLE
      Click Table painter
    DEFAULT %LTYPE will be Created
    a) If you want more like Header footer etc add by rt click on %LTYPE1
    Table (Tab)
    %LTYPE  Radio(SELECT) 5 CM 5 CM 6 CM
    CLICK on DATA (Tab)
    INTERNAL TABLE ITAB LIKE ITAB
    5)RT click on table control and create --> program lines
    General attribute (Tab)
    INPUT PARAMETER               OUTPUT PARAMETER
    itab                               WA_NETPR
    Code Area
    WA_NETWR = ITAB-NETPR.
    6) RT CLcick on table ctl and create 3 text to display the fields
    a) % text1 +button(insert field)
       FIELD name &itab-ebeln&
    Output options (tab)
    Check New line   LINETYPE   %Ltype1
    check new cell
    b) % text2
       & itab-ebelp&
    output options
    check new cell
    c) % text2
       & wa_netpr&
    output options
    check new cell
    <b>Report ac
    Tables ekpo.
    Data: itab1 like ekpo occurs 0 with header line.
    select * into table itab1 from ekpo.
    Call function module --> smart form function module and pass your internal table</b>
    Regards,
    SaiRam

  • How to create the condition record by ABAP program

    Hi Friends,
    I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance.
    Joe GR.

    Joe,
      Check with below FM..
    BAPI_PRICES_CONDITIONS.
    Check this link:
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    examples....
    http://www.4ap.de/abap/bapi_prices_conditions.php
    Two useful threads on Same topic
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Re: Problem with BAPI_PRICES_CONDITIONS
    BAPI_PRICES_CONDITIONS
    Please check this sample code from other thread.
    wtable1-table_no = '306'.
    wtable1-applicatio = 'V'.
    wtable1-cond_type = 'ZPR0'.
    wtable1-operation = '009'.
    wtable1-varkey = '13001001USD 000000000050068946'.
    wtable1-valid_to = '99991231'.
    wtable1-valid_from = '20051101'.
    wtable1-cond_no = '$000000001'.
    APPEND wtable1 TO table1.
    wtable2-operation = '009'.
    wtable2-cond_no = '$000000001'.
    wtable2-created_by = sy-uname.
    wtable2-creat_date = '20051022'.
    wtable2-cond_usage = 'A'.
    wtable2-table_no = '110'.
    wtable2-applicatio = 'V'.
    wtable2-cond_type = 'ZPR0'.
    wtable2-varkey = '13001001USD 000000000050068946'.
    wtable2-valid_from = '20051101'.
    wtable2-valid_to = '99991231'.
    APPEND wtable2 TO table2.
    wtable3-operation = '009'.
    wtable3-cond_no = '$000000001'.
    wtable3-cond_count = '01'.
    wtable3-applicatio = 'V'.
    wtable3-cond_type = 'ZPR0'.
    wtable3-scaletype = 'A'.
    wtable3-scalebasin = 'C'.
    wtable3-scale_qty = '1'.
    wtable3-cond_p_unt = '1'.
    wtable3-cond_unit = 'EA'.
    wtable3-calctypcon = 'C'.
    wtable3-cond_value = '454'.
    wtable3-condcurr = 'USD'.
    APPEND wtable3 TO table3.
    CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
    PI_initialmode = 'X'
    PI_BLOCKNUMBER =
    TABLES
    ti_bapicondct = table1
    ti_bapicondhd = table2
    ti_bapicondit = table3
    ti_bapicondqs = table4
    ti_bapicondvs = table5
    to_bapiret2 = table6
    to_bapiknumhs = table7
    to_mem_initial = table8
    EXCEPTIONS
    update_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
    loop at table6 into ret.
    write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
    RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
    RET-PARAMETER,RET-ROW,RET-FIELD.
    endloop.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *EXPORTING
    WAIT =
    IMPORTING
    return = ret
    ENDIF.
    Don't forget to reward if useful....

  • How to create Inbound Idocs in a ABAP program? Any function Module?

    Hello Experts,
    My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
    I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
    If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
    I populated T_EDIDD with data records from  IDOC_INBOUND_WRITE_TO_DB.
    To the function module IDOC_INPUT_ORDERS,  T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
    I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
    I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
    Can anybody please provide inputs?
    Regards.

    Hi Anjali,
    Thanks for the response.
    I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
    for compatibility: clear administration data of data records
               perform data_records_wipe
                                      tables
                                          t_data_records.
    FORM DATA_RECORDS_WIPE
                      TABLES
                          T_DATA_RECORDS_IN  STRUCTURE EDIDD.
      LOOP AT  T_DATA_RECORDS_IN.
        CLEAR: T_DATA_RECORDS_IN-MANDT,
               T_DATA_RECORDS_IN-DOCNUM,
               T_DATA_RECORDS_IN-SEGNUM,
               T_DATA_RECORDS_IN-PSGNUM,
               T_DATA_RECORDS_IN-HLEVEL.
        modify t_data_records_in.
      ENDLOOP.
    ENDFORM.                               " DATA_RECORDS_WIPE
    This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
    I need to create INBOUND Idocs with the data in ABAP program.
    Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
    Regards

  • How can I trigger an event from an ABAP Program

    Hi everyone,
    I have a requirement, where I have to create an ABAP program, that has to execute (trigger) an event which belongs to a Process Chain. when I run the program, the Process Chain has to run.
    So, how can I do it?
    Thanks for your help, Federico

    HI ,
    The program can call function module BP_EVENT_RAISE to raise the event. you can create vent in sm64 and sm62 .There you give the parameter of the event same as what you will define in the event of start variant of your process chian ..
    Regards,
    shikha

  • How to call a BW Query from an ABAP program?

    How to call a BW Query from an ABAP program?

    hi
    check this link
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
    hope this helps
    cheers

Maybe you are looking for