Passing values to idoc data of type edidd40  using ABAP

Hi All,
I am using orders05 (purchasing) idoc for creating purchase order inbound in ABAP program. I need to read a file and fill values to idoc_data of type edidd40
and idoc control record (of type edidc) and call function module idoc_inbound asynchronous. In this, how can I fill the values to idoc_data (edidd40). If anyone has some sample program to fill idoc_data (of type edidd40), it will be helpful.
Thanks

Hi,
Please find a sample code
* Build Control records
CONTROL_RECORD_OUT-MESTYP = MESTYP.
CONTROL_RECORD_OUT-IDOCTP =  IDOC_TYPE.
CONTROL_RECORD_OUT-RCVPRT = 'LS'.   " << Fill the receiver port type US/LS
CONTROL_RECORD_OUT-RCVPRN = LOGSYS.
* Build Data records
*--- EDIDD40 data Here if you have multiple items then make a loop
loop at i_itab.                   " i_itab contains the details about EDIDD40 fields
  IT_EDIDD-SEGNAM = SEGMENT.   " Will be EDIDD40
  IT_EDIDD-SDATA = i_itab.
*--- Append the data
APPEND IT_EDIDD.
endloop.
aRs

Similar Messages

  • Passing value from field symbol / variable type ref to data to variable

    hey ,
    DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE
    .* Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
    how can i pass RT_CARRID or <FS_CARRID> to a varible with type vbap-netgrw ( net weight ) ?
    thanks
    ASA

    >
    ASA MOKED wrote:
    > hey ,
    >
    >
    > DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
    >   DATA: RT_CARRID TYPE REF TO DATA.
    >   FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE

    > .* Retrieve the data from the select option
    >   RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_WEIGHT).
    > * Assign it to a field symbol
    >   ASSIGN RT_CARRID->* TO <FS_CARRID>.
    create a work area of type <FS_CARRID>.
    field-symbol: <fs_wa> type line of <FS_CARRID>.
    loop at <FS_CARRID> into <fs_wa>.
    lv_netgr = <fs_wa>-netgr.

  • Not able to get the taxonomy field value of meta data field type

    Hi Everyone,
    Not able to get the taxonomy filed value from the metadata filed type.
    Any one can help me on this.
    Label, TermGuid, ValidatedString are showing empty when i debug the code.
    Below is the code which i used to get the taxonomy filed value

    Hi,
    Can you please try getting this way?
    var taxonomyField = listItem.Fields.GetFieldByInternalName(fieldName) as TaxonomyField;
    if (taxonomyField.AllowMultipleValues)
    var fieldValuesCollection = listItem[taxonomyField.Title] as TaxonomyFieldValueCollection;
    return fieldValuesCollection.Select(x => new Guid(x.TermGuid)).ToList();
    else
    var fieldValue = listItem[taxonomyField.Title] as TaxonomyFieldValue;
    return new List<Guid>() { new Guid(fieldValue.TermGuid) };
    Hope it helps!
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

  • How can I pass value in status and reason for rejection using BAPI_LEAD_CREATEMULTI when creating multiple lead

    Hello,
    I want pass value in STATUS and Reason for rejection according to requirement when i am creating multiple lead using BAPI_LEAD_CREATEMULTI. Please help me how can i pass value. Please give some sample code that in which table i have to pass values and please also tell me INPUT_FIELDS values. Please help me
    Regards,
    Kshitij Rathore

    Hello,
    Please help me for solve this problem. I am trying to solve problem from last 4 days but i didn't get any solution.
    Regards,
    Kshitij Rathore

  • Data is not displaying using ABAP WebDynPro

    Hi,
    Thanks in Advance.
    I am trying to get the data of field AUFNR and KTEXT from AUFK table into Layout.
    These are the attributes of Change Node
    Node Name            PROD_ORDER
    Interface Node                   : No
    Input Element (Ext.)           : No
    Dictionary structure AUFK
    Cardinality                    :      0..n
    Selection                     :       0..1
    Init. Lead Selection       :   Yes
    Singleton                     : No
    Supply Function
    Mapping Path
    Method :
    I have written the following code to fetch the data from AUFK table
    method WDDOINIT .
    Data: it_AUFK type standard table of AUFK,
          context_node type ref to if_wd_context_node.
    select AUFNR KTEXT from AUFK INTO table it_AUFK.
      if sy-subrc eq 0.
        context_node = wd_context->get_child_node( name = 'PROD_ORDER').
        context_node->bind_table( it_AUFK ).
      endif.
    endmethod.
    There is no syntax error and getting activated. But while testing no data or even column is displaying into browser. It is blank page.
    Am not sure where I am wrong. Please assist me.
    Thanks

    Hi ,
    Check this for testing purpose :
    Afer you have binded the internal table to the node , check if node has some vlaues in it or not :
    Use this code to get the data of node into an internal table and see if the node is getting populating with data  or not :
    DATA lo_nd_cn_table TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_table TYPE REF TO if_wd_context_element.
        DATA ls_cn_table TYPE wd_this->element_cn_table.
    DATA it_table  TYPE wd_this->elements_cn_table.
    *   navigate from <CONTEXT> to <CN_TABLE> via lead selection
        lo_nd_cn_table = wd_context->get_child_node( name = wd_this->wdctx_cn_table ).
    *lo_nd_cn_table->get_static_attributes_table( IMPORTING table = lt_table).*
    <CN_table is my node binded to table.>

  • How to save HR data in Active Directory using ABAP i.e thru LDAP Connector

    Hi All,
           Can any one please help me out how
           to save HR data in Active directory
           using LDAP Connector ?             
           Please help ASAP as it is very urgent .
    Thanks
    Jitendra

    There are 100 of such scripts are there online.
    here are few tips and codes. you will get more.  
    https://gallery.technet.microsoft.com/scriptcenter/Feeding-data-to-Active-0227d15c
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/31/use-powershell-to-modify-existing-user-accounts-in-active-directory.aspx
    http://powershell.org/wp/forums/topic/ad-import-csv-update-attributes-script/
    Please mark this as answer if it helps

  • How to save hr data in Active directory  using abap

    Hi all
    can any one please help me out how to save hr data in Active directory using LDAP connector
    please help as this is very urgent requirement
    thanks in advance
    Thanks
    Chanti

    What form do you have the user's name in ?
    ANTIPODES\alberteString searchFilter = "(&(objectClass=user)(samAccountName=alberte))";[email protected] searchFilter = "(&(objectClass=user)(userPrincipalName=[email protected]))";Albert EinsteinString searchFilter = (&(objectClass=user)(givenName=Albert)(sn=Einstein))";or using Ambiguous Name Resolution (anr)String searchFilter = "(&(objectClass=user)(anr=Albert Einstein))";or it's even clever enough to useString searchFilter = "(&(objectClass=user)(anr=Einstein Albert))";

  • ADF UIX Passing values from one Data Control to another

    How to transfer value of any column in the selected row of the table (one data control) to the messageTextInput, based on another Data Control?
    It may be on a single UIX-page or on different pages.
    Thank you.

    HI Prithviraj,
    The problem screen shot is as follows:
    The First Applicant is coming from one sub report and the second applicant is coming from another sub report. It is working fine from Crystal reports. But in the Crystal report viewer i am unable to get the out come as 1,2,3.
    If you need any additional information please let me know.
    Thanks
    Penchal

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • Open and pass value to page 2 from page 1 using region button

    Good day,
    I created 2 pages. I have created a text item called p_employeeid in page 1 and a region button with button action redirect to page 2. When i click the button i can open page 2 but i cannot filter the records that pertains only to p_employeeid. my source for page 2 is select * from test_tbl where employeeid = :p_employeeid.
    Help would really be appreciated. thank you.
    Mon

    hi trent,
    i created a branch as well. on submit after processing target type page in this application, page 2 and set this item p2_employeeid and value for this item &p1_employeeid. i did not select any in condition type but selected the button i created submit in the when button pressed. the action of my submit button is submit page.
    below is the apex url using button only without branches: only the value of p2_employeeid is not included in the url
    http://172.16.10.10:8080/apex/f?p=103:2:872957668524402::NO:2:P2_EMPLOYEEID:
    this is with branching: no p2_empoyeeid nor the valu
    http://172.16.10.10:8080/apex/f?p=103:2:872957668524402::NO:::
    i notice that using the branching even p2_employeeid is not submitted whereas in the button ihave th p2_employeeid but no item value.
    I have googling and trying out samples but all i see are table columns with the edit icon. I have not seen example with text box with button calling another page. :(
    thank you for the assistance, if you can think of any other suggestion i would be willing to try them out.
    Mon

  • How to read data from an excel using abap program?

    Hi
    I have to write an abap program to read the contents of ms excel across various
    sheets. Can any one help me regarding this
    Thanks in advance
    Satish

    Hai Satish,
    <b>You save  all your Excel sheets as Text Tab Delimited.</b>
    And then for each teext file can be uploaded into your daabase table.
    See the Report that  i have done.
    REPORT Z_UPLOAD_TO_DATABASE_TABLE.
    TABLES:
      ZDETMAST.                        " Database table to be uploaded
    Data declaration of the structure to hold ZDETMAST(zdetcode) data  *
    DATA:
      BEGIN OF FS_ZDETMAST,
        CNT(3)      TYPE C,                " Client
        DETCODE(15) TYPE C,                " Det Code
        DETCAT(1)   TYPE C,                " Det category
        DETTYPE(2) TYPE  N,                " Det type
        DETDESC(30) TYPE C,                " Det description
        PFLAG(1)   TYPE C,                " Det Flag
        TOTALDR(10) TYPE C,                " Total DR
        TOTALCR(10) TYPE C,                " Total CR
      END OF FS_ZDETMAST.
    Internal table to hold ZDETMAST(zdetcode) data                     *
    DATA:
      T_ZDETMAST LIKE STANDARD TABLE OF FS_ZDETMAST.
    Function Module to upload ZDETMAST Data
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         FILENAME                      = 'D:/ZDETMAST_2.TXT'
         FILETYPE                      = 'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = 'DAT'
        CODEPAGE                      = ' '
        IGNORE_CERR                   = ABAP_TRUE
        REPLACEMENT                   = '#'
        CHECK_BOM                     = ' '
        VIRUS_SCAN_PROFILE            =
      IMPORTING
        FILELENGTH                    =
        HEADER                        =
        TABLES
          DATA_TAB                      = T_ZDETMAST
       EXCEPTIONS
         FILE_OPEN_ERROR               = 1
         FILE_READ_ERROR               = 2
         NO_BATCH                      = 3
         GUI_REFUSE_FILETRANSFER       = 4
         INVALID_TYPE                  = 5
         NO_AUTHORITY                  = 6
         UNKNOWN_ERROR                 = 7
         BAD_DATA_FORMAT               = 8
         HEADER_NOT_ALLOWED            = 9
         SEPARATOR_NOT_ALLOWED         = 10
         HEADER_TOO_LONG               = 11
         UNKNOWN_DP_ERROR              = 12
         ACCESS_DENIED                 = 13
         DP_OUT_OF_MEMORY              = 14
         DISK_FULL                     = 15
         DP_TIMEOUT                    = 16
         OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.                                 " IF SY-SUBRC <> 0.
    LOOP AT T_ZDETMAST INTO FS_ZDETMAST.
      WRITE:
        / FS_ZDETMAST-CNT,
         FS_ZDETMAST-DETCODE,
         FS_ZDETMAST-DETCAT,
         FS_ZDETMAST-DETTYPE,
         FS_ZDETMAST-DETDESC,
         FS_ZDETMAST-PFLAG,
         FS_ZDETMAST-TOTALDR,
         FS_ZDETMAST-TOTALCR.
    ENDLOOP.                               " LOOP AT T_ZDETMAST ...
    LOOP AT  T_ZDETMAST INTO ZDETMAST.
       IF SY-TABIX GE 2.
         INSERT ZDETMAST.
        DELETE ZDETMAST.
       ENDIF.                              " IF SY-TABIX EQ 2
    ENDLOOP.                               " LOOP AT  T_ZDETMAST
    Hope this helps you a lot.
    <b>You can also use ALSM_EXCEL_TO_INTERNAL_TABLE FM to have excel data in ITAB AND THEN YOU CAN INSERT DATA INTO DATABASE TABLE.</b>
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

  • SAP HR data retriveal into LDAP using ABAP Report

    Hi ,
    Does anyone have an idea for extracting SAP HR Employee data into LDAP (Directory based service)by using any abap report and function module
    Rohit

    I'm also interested...
    @Rohit Kumar Shukla
    Did you already receive an answer?
    Kind regards,
    Mario Möllenbeck

  • Translating descriptor file into data file of printlist using ABAP

    Hi,
    How to translate descriptor file contents into data file contents of Printlist?
    Anyone have any clue regarding this please reply ASAP.
    Thanks & Regards,
    Manali

    hi use the bdc or bapi or lsmw...for this ..to upload the data into sap

  • How to Pass values between one webdynpro application to another

    Hi ,
        I know How to Pass Values Between the Application by URL But For My Requirement NO need The Pass in URL Rather Than That Please any one TEll me How to GEt VAlues BEtween the application......
    Thanks
    ANANTH.

    If you dont want to pass values through URL, then you must have to use component Usage with interface node.
    Or you can try like this,
    by appending field value to url,
    Data w_url type string,
    w_value type string.
    get the url of calling aplication
    call method cl_Wd_utilities->construct_wd_url
    exporting application name = name of second application( to which u want to pass parameter )
    importing out_absolute_url = w_url.
    ***Make the value type compatible that has to passed with url.
    w_string = lv_pernr
    ***Now attach the parameter and its value with url that have to passed to 2nd application
    call method cl_http_Server=>append_field_url
    exporting name = 'pernr'
    value = ' w_value'
    changing url = w_url.
    then popup window for 2nd application with above url
    lo_window = lo_window_manager->create_external_application ( url = w_url ).
    lo_window -> open( ).
    ***now in wddoinit of 2nd application
    data lv_param type string
    lv_param = wdr_task=>client_window->get_parameter( ' pernr ').
    Now you can use lv_param in 2nd application.
    Regards
    srinivas

  • Pass value from 1 view to other view

    Hello Friends,
    I am new to ABAP dynpro, I am working on one sample program. I have created 2 views, in 1st view I have 2 input fields and go button. In second view, 1 input field and 'back button'. I want to enter 2 numbers in 1st view and multiply it and display it in 2nd view.
    Please help to achieve this functionality.
    Thanks,
    Shreekant

    Hi Radhika,
    Sorry for troubling you.. Here is the code I have written for OnAction on Button. (for view1(input_view))
    method ONACTIONGOTO_RESULT .
      DATA lo_el_context1 TYPE REF TO if_wd_context_element.
      DATA ls_context1 TYPE wd_this->element_context.
      DATA lv_zint1 LIKE ls_context1-zint1.
    get element via lead selection
      lo_el_context1 = wd_context->get_element(  ).
    get single attribute
      lo_el_context1->get_attribute(
        EXPORTING
          name =  `ZINT1`
        IMPORTING
          value = lv_zint1 ).
      DATA lo_el_context2 TYPE REF TO if_wd_context_element.
      DATA ls_context2 TYPE wd_this->element_context.
      DATA lv_zint2 LIKE ls_context2-zint2.
    get element via lead selection
      lo_el_context2 = wd_context->get_element(  ).
    get single attribute
      lo_el_context2->get_attribute(
        EXPORTING
          name =  `ZINT2`
        IMPORTING
          value = lv_zint2 ).
    Multiply 2 numbers
      data: l_data type int4.
      clear: l_data.
      l_data = lv_zint1 * lv_zint2.
    wd_this->fire_go_to_result_plg( ).
    endmethod.
    >>> In the above code, I have stored the value in l_data, which I want to populate in result_view.
    If I use 'wd_this->fire_go_to_result_plg( ).' in above code, it will go to result_view, but no value is populating.
    Please can you provide me the sample code to achieve it...
    OR, also let me know if any other simple method to achieve this functionality.
    Thanks for the help.
    Regards,
    Shreekant

Maybe you are looking for