Account document parking in BDC with multiple records

Hi,
I am writing one BDC program to park document( not posting the document) using transaction u2018FBV1u2019.In the file, we can have multiple item for posting key 40 and single item for posting key 50 and vice-versa. We can have multiple item both for posting key 40 and 50. But the summation of all amount of all record for posting key 40 and 50 should be u20180u2019( for debit and credit).All these multiple records is actually creating one account document.
I have created the recording and written the BDC program, but I hope I am missing the grouping of records for posting key 40 and 50 for single document number. Can pls guide me for the same. If anyone has encountered such problem, can you pls guide me for the same. If you haave the code for BDC, please send me the same.
Edited by: amrita banerjee on Jun 20, 2008 12:53 AM

Hi amrita,
I do not understand what do you mean by grouping of records. Can you please explain.
Still for parking documents, the recommended solution will be to use the standard batch input program RFBIBL00.
Here is the sample psedo-code
*bgr00
  wa_bgr00-stype   = 0.
  CONCATENATE  'FBV1' sy-uzeit+0(2) '_' sy-uzeit+4(2)
              INTO wa_bgr00-group.
  wa_bgr00-mandt   = sy-mandt.
  wa_bgr00-usnam   = sy-uname.
  wa_bgr00-start   = sy-datum.
  wa_bgr00-xkeep   = space.
  wa_bgr00-nodata  = '/'.
  MOVE wa_bgr00 TO wa_file.
  APPEND wa_file TO it_file.
  v_empty_indicator = wa_bgr00-nodata .
*bbkpf
  PERFORM build_data CHANGING wa_bbkpf.
  wa_bbkpf-stype = 1.
  wa_bbkpf-tcode = 'FBV1'.
  wa_bbkpf-bldat = wa_docheader-doc_date.
  wa_bbkpf-blart = wa_docheader-doc_type.
  wa_bbkpf-bukrs = wa_docheader-comp_code.
  wa_bbkpf-budat = wa_docheader-pstng_date.
  wa_bbkpf-monat = wa_docheader-fis_period.
  wa_bbkpf-waers = 'USD'.
  wa_bbkpf-xblnr = wa_docheader-ref_doc_no.
  wa_bbkpf-bktxt = wa_docheader-header_txt.
  MOVE wa_bbkpf TO wa_file.
  APPEND wa_file TO it_file.
*bbseg
  LOOP AT it_accntgl INTO wa_accntgl.
    CLEAR wa_bbseg.
    PERFORM build_data CHANGING wa_bbseg.
    READ TABLE it_curramount INTO wa_curramount INDEX wa_accntgl-itemno_acc.
    wa_bbseg-stype = '2'.
    wa_bbseg-tbnam = 'BBSEG'.
    wa_bbseg-zuonr = wa_accntgl-alloc_nmbr.
    wa_bbseg-newbk = wa_accntgl-comp_code.
    wa_bbseg-wrbtr = wa_curramount-amt_doccur.
    wa_bbseg-kostl = wa_accntgl-costcenter.
    wa_bbseg-aufnr = wa_accntgl-orderid.
    wa_bbseg-hkont = wa_accntgl-gl_account.
    wa_bbseg-prctr = wa_accntgl-profit_ctr..
    wa_bbseg-projk = wa_accntgl-wbs_element.
    IF wa_curramount-amt_doccur LT 0.
      wa_bbseg-newbs  = '40'.
    ELSE.
      wa_bbseg-newbs  = '50'.
    ENDIF.
    MOVE wa_bbseg TO wa_file.
    APPEND wa_file TO it_file.
  ENDLOOP.
  DATA: l_filepath TYPE eseftappl.
  CONCATENATE '/tmp/FBV1_load' sy-uzeit '.txt' INTO l_filepath.
*write app file for rfbibl00
  PERFORM write_data_appl USING it_file l_filepath.
*Submit the data to post the document
  SUBMIT rfbibl00 WITH ds_name   = l_filepath
                  WITH fl_check  = ' '
                  WITH callmode  = 'C'
                  WITH xinf      = 'X'
                  AND RETURN.
form build_data  changing pv_header  TYPE any.
DATA:
    v_field(3)   TYPE n.
  FIELD-SYMBOLS <fs_field_value> TYPE ANY.
  v_field = 1.
  DO.
    ASSIGN COMPONENT v_field  OF STRUCTURE pv_header TO <fs_field_value>.
    IF sy-subrc = 0.
*     if the field is empty then fill it with nodata indicatort
      IF <fs_field_value> IS INITIAL.
        <fs_field_value> = v_empty_indicator.
      ENDIF.
      v_field = v_field + 1.
    ELSE.
      EXIT.
    ENDIF.
  ENDDO.
endform.                    " build_data
form write_data_appl   USING    pv_file      TYPE ty_t_filedata
                                pv_file_path TYPE eseftappl.
  DATA:
       wa_file   TYPE ty_filedata,
       wa_return TYPE bapiret2,
       v_msg  TYPE string.
*Open the application server file
*and write the data
  OPEN DATASET pv_file_path FOR OUTPUT
               IN TEXT MODE ENCODING NON-UNICODE
               MESSAGE v_msg.
  IF sy-subrc = 0.
*   write the file to the application server
    LOOP AT pv_file INTO wa_file.
      TRANSFER wa_file TO pv_file_path.
    ENDLOOP.
    CLOSE DATASET pv_file_path.
  ELSE.
    message e000(00) with v_msg.
  ENDIF.
endform.                    " write_data_appl
Thanks
Romit

Similar Messages

  • How can I convert string to the record store with multiple records in it?

    Hi Everyone,
    How can I convert the string to the record store, with multiple records? I mean I have a string like as below:
    "SecA: [Y,Y,Y,N][good,good,bad,bad] SecB: [Y,Y,N][good,good,cant say] SecC: [Y,N][true,false]"
    now I want to create a record store with three records in it for each i.e. SecA, SecB, SecC. So that I can retrieve them easily using enumerateRecord.
    Please guide me and give me some links or suggestions to achieve the above thing.
    Best Regards

    Hi,
    I'd not use multiple records for this case. Managing more records needs more and redundant effort.
    Just use single record. Create ByteArrayOutputStream->DataOutputStream and put multiple strings via writeUTF() (plus any other data like number of records at the beginning...), then save the byte array to the record...
    It's easier, it's faster (runtime), it's better manageable...
    Rada

  • File to RFC with multiple records using BPM Scenario Error...!!!

    Hello Guru's,
      I have done the File to RFC with multiple records using BPM scenario as per the Materiel available in the sdn.sap. This involves BAPI (BAPI_MATERIEL_AVAILABILITY). I have done exactly the same what is their in the materiel. SXI_CACHE is also giving return value " 0 ". File is getting deleted from the source directory, but no file in target directory. SXMB_MONI is also showing no error (black Flag). BPM is also error free. Checked the interfaces also.
    Can any one tell me what mistake would i have done.
    Thanks in advance.

    Hi,
    There is one similar discussion I found,
    FTP TO RFC using BPM
    Thanks
    Swarup

  • How to isolate error with a record/segment in IDOC with multiple records

    I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
    1. How can I pre-processed the IDOC to remove those control characters?
    Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
    2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
    Thanks in advance.

    Split the IDoc.
    with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
    if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
    U have to do this in the context of IDoc.
    If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
    If U wanna pass this string to source/target, U can do in error messages branch in BPM.
    U must use BPM for splitting the IDoc, since it is multi-mapping.
    reg.,
    Yallabandi.

  • Flat File with multiple record types (OWB 10.2.0.2)

    Hi!
    I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
    In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
    Type Value Record Name
    ======== ===========
    T TRAILER
    0 DETAILS
    1 DETAILS
    2 DETAILS
    When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
    INTO TABLE TRAILER
    TRUNCATE
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:1) = 'T'
    INTO TABLE DETAILS
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:1) = '0,1,2'
    The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
    Could this be a bug or am I doing something wrong?
    Thanks a lot for your help,
    Yorgos

    We`re using two target tables, one for the trailer record and the other for the details records.
    We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
    As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
    Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
    Your help is greatly appreciated Jean-Pierre.
    Regards,
    Yorgos

  • Handling Change of IT with multiple records in P&F

    Good Morning all,
    Has anyone done this yet? What is the approach to change an infotype with multiple records using P&F; For example IT0021, Subtype 2 (Child). I'm assuming that we will need to display all the records in a tbale first in the Form. Then, create a button or radio button for each row. On click, we can then make changes to the record. Any ideas? Thanks
    Regards

    Welcome to the forum. You can loop through the records like following.
    go_block('A');
    First_Record;
    Loop
    variable := :A.Item_Name;
    Exit when :System.Last_Record = 'TRUE';
    Next_Record;
    End Loop;But what happens when u run the above code, the variable will have the last record's item value.
    So how you are trying to get all the record's Item value into one item?
    Are you going to concatenate? What's the logic you are planning?
    Regards
    Sankar MN

  • Select max date from a table with multiple records

    I need help writing an SQL to select max date from a table with multiple records.
    Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
    SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
    0000651005 BASE 15-AUG-07 YES
    0000651005 BASE 13-NOV-09 NO
    0010973671 BASE 20-MAR-08 YES
    0010973671 BASE 18-JUN-10 NO

    Hi,
    Welcome to the forum!
    Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
    For example:
    CREATE TABLE     table_x
    (     sa_id          NUMBER (10)
    ,     char_type     VARCHAR2 (10)
    ,     effdt          DATE
    ,     char_val     VARCHAR2 (10)
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
    COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
    `    SA_ID LAST_EFFD
        651005 13-NOV-09
      10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
    Here's how to get those results:
    SELECT    sa_id
    ,         MAX (effdt)    AS last_effdt
    FROM      table_x
    GROUP BY  sa_id
    ;

  • Accounting Document Creation in FB60 with Tax Calculation Enable

    Hello everyone,
    I am currently facing a strange issue. The issue is that I am using transaction FB60 to create an accounting document.
    How I proceed with:
        1. Go to FB60
        2. Enter the necessary details
        3. Click on the "Save" button to post the document.
    To view the accounting document created,
        1. Go to FB03
        2. Enter the document number generated previously to view the document.
    The problem is that, currently I need to update a field in the accounting document during its creation. I know that the BaDi 'AC_DOCUMENT' is called before creation of any accounting document.
    I have hardcoded a break point in the BADI to test whether when clicking on the button 'SAVE' from transaction FB60, whether the BADI 'AC_DOCUMENT'is called, and the debugger was not trigger.
    I don't understand why the BADI 'AC_DOCUMENT'is not trigger, i did activate the 'Update debugger' to test whether the BADI was executed in the background but in vain, the BADI 'AC_DOCUMENT' was not triggered.
    But if I click on 'PARK'(I don't  know a park document is  document in transaction FB60, the BADI 'AC_DOCUMENT' is trigger.
    I would be grateful if someone gives me an idea or a small explanation on what is going on in the back.
    Maybe, I am wrong with the BADI 'AC_DOCUMENT', maybe this BADI's is not trigger every time an accounting document is created.
    Thanks a lot in advance.
    Kind Regards,
    Bryan

    what field do you want to update? did you try FI substitution?

  • ABAP Mapping with multiple records

    Hi All,
    I am doing an ABAP mapping and I am new to this.
    I have a following record structure:
    <record>
       <field1>
       <field2>
       <fieldn>
    </record>
    I will receive the multiple records with the above structure in single file.
    I have following the Blog from SDN but it is saying only for single record.
    Can please someone post the code for handing multiple records (ie. loop structure).
    or else please mail me at [email protected]
    Regards,
    Shylesh

    Hi Thanks for the reply.
    But actually these threads do not sufficient for my requriement.
    I written the following code and it is working fine for one single record.  But I want to change this code to work for multiple records which I am not able to do as I am new to Object Oriented.
    method IF_MAPPING~EXECUTE.
    initialize iXML
      type-pools: ixml.
      class cl_ixml definition load.
    create main factory
      data: ixmlfactory type ref to if_ixml.
      ixmlfactory = cl_ixml=>create( ).
    create stream factory
      data: streamfactory type ref to if_ixml_stream_factory.
      streamfactory = ixmlfactory->create_stream_factory( ).
    create input stream
      data: istream type ref to if_ixml_istream.
      istream = streamfactory->create_istream_xstring( source ).
    parse input document =================================================
    initialize input document
      data: idocument type ref to if_ixml_document.
      idocument = ixmlfactory->create_document( ).
    parse input document
      data: iparser type ref to if_ixml_parser.
      iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                                     istream = istream
                                                    document = idocument ).
      iparser->parse( ).
    get message content of tag <empno>
      data: incode type ref to if_ixml_node_collection.
      data: incode1 type ref to if_ixml_node_collection.
      data: incode2 type ref to if_ixml_node_collection.
      data: incode3 type ref to if_ixml_node_collection.
      data: incode4 type ref to if_ixml_node_collection.
      data: incode5 type ref to if_ixml_node_collection.
      data: incode6 type ref to if_ixml_node_collection.
      data: incode7 type ref to if_ixml_node_collection.
      data: incode8 type ref to if_ixml_node_collection.
      data: incode9 type ref to if_ixml_node_collection.
      incode = idocument->get_elements_by_tag_name( 'empno' ).
      incode1 = idocument->get_elements_by_tag_name( 'empname' ).
      incode2 = idocument->get_elements_by_tag_name( 'address1' ).
      incode3 = idocument->get_elements_by_tag_name( 'address2' ).
      incode4 = idocument->get_elements_by_tag_name( 'address3' ).
      incode5 = idocument->get_elements_by_tag_name( 'zipcode' ).
      incode6 = idocument->get_elements_by_tag_name( 'mailid' ).
      incode7 = idocument->get_elements_by_tag_name( 'phoneno' ).
      incode8 = idocument->get_elements_by_tag_name( 'country' ).
      incode9 = idocument->get_elements_by_tag_name( 'city' ).
    get XI header data (here: "Sender Service")
      data: l_sender_service type string.
      l_sender_service = param->get( if_mapping_param=>sender_service ).
    add trace (appears in message monitoring)
      data: l_trace type string.
      concatenate 'Sender Service = ' l_sender_service into l_trace.
      trace->trace( level = '1'
      message = l_trace ).
    build up output document =============================================
    create output document
      data: odocument type ref to if_ixml_document.
      odocument = ixmlfactory->create_document( ).
    create element 'SenderService' and add it to the document
      data: msgtype type ref to if_ixml_element.
      msgtype = odocument->create_simple_element( name = 'record'
                                                parent = odocument ).
    create element 'SenderService' and add it to the output document
      data: elementsender type ref to if_ixml_element.
      elementsender = odocument->create_simple_element( name = 'SenderService'
                                                       value = l_sender_service
                                                      parent = msgtype ).
    add node to the output document
      data: outcode type ref to if_ixml_node.
      data: outcode1 type ref to if_ixml_node.
      data: outcode2 type ref to if_ixml_node.
      data: outcode3 type ref to if_ixml_node.
      data: outcode4 type ref to if_ixml_node.
      data: outcode5 type ref to if_ixml_node.
      data: outcode6 type ref to if_ixml_node.
      data: outcode7 type ref to if_ixml_node.
      data: outcode8 type ref to if_ixml_node.
      data: outcode9 type ref to if_ixml_node.
      outcode = incode->get_item( index = 0 ).
      outcode1 = incode1->get_item( index = 0 ).
      outcode2 = incode2->get_item( index = 0 ).
      outcode3 = incode3->get_item( index = 0 ).
      outcode4 = incode4->get_item( index = 0 ).
      outcode5 = incode5->get_item( index = 0 ).
      outcode6 = incode6->get_item( index = 0 ).
      outcode7 = incode7->get_item( index = 0 ).
      outcode8 = incode8->get_item( index = 0 ).
      outcode9 = incode9->get_item( index = 0 ).
      data irc type i.
      irc = msgtype->append_child( outcode ).
      irc = msgtype->append_child( outcode1 ).
      irc = msgtype->append_child( outcode2 ).
      irc = msgtype->append_child( outcode3 ).
      irc = msgtype->append_child( outcode4 ).
      irc = msgtype->append_child( outcode5 ).
      irc = msgtype->append_child( outcode6 ).
      irc = msgtype->append_child( outcode7 ).
      irc = msgtype->append_child( outcode8 ).
      irc = msgtype->append_child( outcode9 ).
    render document ======================================================
    create output stream
      data: ostream type ref to if_ixml_ostream.
      ostream = streamfactory->create_ostream_xstring( result ).
    create renderer
      data: renderer type ref to if_ixml_renderer.
      renderer = ixmlfactory->create_renderer( ostream = ostream
                                              document = odocument ).
      irc = renderer->render( ).
    endmethod.
    Can anybody help me making these changes.
    Thanks in advance.
    Shylesh

  • Change Accounting Document FB02 without BDC

    Hi All,
    I want to created ABAP program for Change Accounting Document Information like transaction FB02.
    but i dont want to use BDC, cause i don't want to give user authorization FB02,
    Can somebody give me the solution.
    Best Regards,
    Ferry

    Hi,
    Use the concept of Transaction variants.(Transaction SHD0) You need not copy the standard program for FB02, Just create a transaction variant for FB02 and assign a custom transaction code(also called variant transaction) to access the transaction
    Also you can assign authorizations for the custom transaction.
    Using transaction variant, you can hide some fields(business critical), input disable, make mandatory and default some values on the screen fields of FB02.
    Also note: If you active the transaction variant as Standard variant, then when ever you call FB02, the transaction variant is called with the screens(of the transaction variant)
    Documentation for transaction variants is available in SHD0 -> Application tool bar -> icon
    Hope this helps
    Regards
    Shiva

  • Loading Hex Files with multiple records with each line starting with : record marker, how do I load this hex file into a front panel table ? thanks in advance, Jeff.

    I have written a routine that loads a Hex file, checks for record marker,length,address etc then loads the data into a table on front panel. However, my routine only loads single record hex files. I need to be able to load multiple record files, I need to identify the ':' colon record marker start for each record in the hex file, I just can't see how to loop my routine so that all records with ':' prefix marker are loaded.

    Jeff,
    I'm not exactly sure of what you are trying to do. Is it possible you could post your code, or a screen shot of the diagram in question, so that I can get a better understanding, and possibly offer some assistance?
    I am familiar with hex files, but not with the : marker separating records. This may be able to be solved with simple text parsing, and as I am not familiar with how you are retrieving and/or displaying the files, I require more information.
    Thanks

  • Problem with Multiple record creation using BAPI BAPI_PRICES_CONDITION

    Hi,
    I am working on IS Media Sales And Distribution wherein i am using BAPI BAPI_PRICES_CONDITION for condition record creation in TCODE JC9B. I am able to create one record using this BAPI for one sales promotion but having problem while creation of multiple records for the same sales promotion wherein my internal table have multiple records. It gives me error that data in BAPICONDIT is missing.
    I am aatching followig code for reference
    BAPI have field of varkey which i am filling as combination of sales org. + distn channel + sales promotion + delivery type
    In this varkey  delivery type is changing for sales promotion Can be said that one sales promotion can have multiple delivery type .
    Am i giving the correct varkey for each itration of internal table ?
    I am attaching code for reference.
    Here loop it_cond contain one promotion and multiple delivery type.
    sales org   distn ch  promotion     delivery
    0100             01        zsalesprom   03
    0100             01        zsalesprom   z3
      LOOP AT it_cond INTO wa_cond.
    Get next condition number
          CALL FUNCTION 'NUMBER_GET_NEXT'
            EXPORTING
              nr_range_nr                   = '01'
              object                        = 'KONH'
      QUANTITY                      = '1'
      SUBOBJECT                     = ' '
      TOYEAR                        = '0000'
      IGNORE_BUFFER                 = ' '
           IMPORTING
              number                        = number
      QUANTITY                      =
      RETURNCODE                    =
    EXCEPTIONS
      INTERVAL_NOT_FOUND            = 1
      NUMBER_RANGE_NOT_INTERN       = 2
      OBJECT_NOT_FOUND              = 3
      QUANTITY_IS_0                 = 4
      QUANTITY_IS_NOT_1             = 5
      INTERVAL_OVERFLOW             = 6
      BUFFER_OVERFLOW               = 7
      OTHERS                        = 8
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Here i am concacating varkey for each new delivery
    CLEAR : l_min,l_length,l_var.
    CONCATENATE wa_cond-vkorg wa_cond-vtweg wa_cond-wrbakt INTO l_var.
    l_length = STRLEN( l_var ).
    IF l_var+14(2) IS INITIAL.
    WRITE wa_cond-lifart TO L_VAR+14.
    l_length = STRLEN( l_var ).
    ENDIF.
    W_LINE = W_LINE + 1.
    *First table in BAPI
            wa_bapicondct-operation = '009'.
            wa_bapicondct-cond_usage = 'A'.
            wa_bapicondct-table_no = '506'.
            wa_bapicondct-applicatio = 'J0'.
            wa_bapicondct-cond_type = 'RATE'.
            wa_bapicondct-varkey = l_var.
            wa_bapicondct-valid_to = wa_cond-datbi.
            wa_bapicondct-valid_from = wa_cond-datab.
            wa_bapicondct-cond_no = number. "
            APPEND wa_bapicondct TO it_bapicondct.
    *Second table in BAPI
            wa_bapicondhd-operation = '009'.
            wa_bapicondhd-cond_no = number.
            wa_bapicondhd-cond_usage = 'A'.
            wa_bapicondhd-table_no = '506'.
           wa_bapicondhd-created_by = sy-uname.
           wa_bapicondhd-creat_date = sy-datum.
            wa_bapicondhd-applicatio = 'J0'.
            wa_bapicondhd-cond_type = 'RATE'.
            wa_bapicondhd-varkey = l_var.
            wa_bapicondhd-valid_from = wa_cond-datab.
            wa_bapicondhd-valid_to = wa_cond-datbi.
            APPEND wa_bapicondhd TO it_bapicondhd.
    *Third table in BAPI
            wa_bapicondit-operation = '009'.
            wa_bapicondit-cond_no = number.
            wa_bapicondit-cond_count = wa_cond-cond_count.
            wa_bapicondit-applicatio = 'J0'.
            wa_bapicondit-cond_type = 'RATE'.
            wa_bapicondit-calctypcon = 'C'.
           wa_bapicondit-scaletype  = 'A'.
            wa_bapicondit-cond_value = wa_cond-kbetr.
            wa_bapicondit-condcurr = wa_cond-konwa.
            wa_bapicondit-promotion = wa_cond-wrbakt.
            APPEND wa_bapicondit TO it_bapicondit.
    *Fourth table in BAPI
            wa_bapicondqs-operation = '009'.
            wa_bapicondqs-cond_no = number.
            wa_bapicondqs-cond_count = wa_cond-cond_count.
            wa_bapicondqs-currency = wa_cond-kbetr.
            wa_bapicondqs-condcurr = wa_cond-konwa.
           wa_bapicondqs-cond_unit = 'EA'.
            wa_bapicondqs-LINE_NO = W_LINE."'0001'.
            APPEND wa_bapicondqs TO it_bapicondqs.
    *Fifth table in BAPI
            wa_bapicondvs-operation = '009'.
            wa_bapicondvs-cond_no = number.
            wa_bapicondvs-cond_count = wa_cond-cond_count.
            wa_bapicondvs-currenckey = wa_cond-konwa.
            wa_bapicondvs-currenciso = wa_cond-konwa.
           wa_bapicondvs-currency = wa_cond-kbetr.
           wa_bapicondvs-condcurr = wa_cond-konwa.
           wa_bapicondvs-curren_iso = wa_cond-konwa.
           wa_bapicondvs-LINE_NO = W_LINE."'0001'.
            APPEND wa_bapicondvs TO it_bapicondvs.
            CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
    EXPORTING
      PI_INITIALMODE       = ' '
      PI_BLOCKNUMBER       =
              TABLES
                ti_bapicondct        = it_bapicondct
                ti_bapicondhd        = it_bapicondhd
                ti_bapicondit        = it_bapicondit
                ti_bapicondqs        = it_bapicondqs
                ti_bapicondvs        = it_bapicondvs
                to_bapiret2          = it_bapiret2
                to_bapiknumhs        = it_bapiknumhs
                to_mem_initial       = it_cnd_mem_initial
             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.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               wait          = 'X'
    IMPORTING
      RETURN        =
            CLEAR : wa_bapicondct,wa_bapicondhd,wa_bapicondvs,wa_bapicondqs.
            CLEAR : wa_bapicondit.
          ENDLOOP.
        ENDIF.
      ENDIF.
    Kindly Suggest.
    Thanks
    Parag

    Solved By myself
    There is problem while passing data to internal table for item level

  • RFIDYYWT across company codes produces 1099 with multiple records per TIN

    We have multiple company codes that post 1099-MISC relevant payments to a common set of vendors.  All payments are processed through our main (paying) company code.
    All our company codes are one taxable entity to the federal government, with one TIN.  We are required to submit one file to the IRS.
    Unfortunately, when we execute RFIDYYWT across company codes we get multiple records per vendor, one for each company code, despite that the vendor has only one TIN.
    How may we customize the system so that a single execution of RFIDYYWT provides an IRS compliant file that aggregates common vendor records?
    Thank you in advance for your assistance.
    Regards,
    Otto Baskin
    P.S. Iu2019m happy to award points.

    Hi
    We have similar issue.. It's been long time.. but I thought of asking you.. Did you find solution? If so, can you please share.
    Thanks
    Srini

  • Tab navigation with multiple records

    Hi,
    Using oracle forms 10g
    I have a form with three tabs - different data blocks, each one can have multiple records. When I select record #3 on the first tab, the corresponding record is not being returned when I click on the 2nd tab. There are relationships defined for each of the data blocks. It does work right when I 'manually' CTR-Page Down through the form from block to block, the correct record is returned and displayed. I have coded the 'when-tab-page-changed' trigger so the topmost tab is being displayed correctly. Not sure what I'm missing... need to do some more coding???
    thanks in advance-

    Are you sending the cursor to the selected block in the When-Tab-Page-Changed trigger? Also, what are the properties of your data block relationship (Specifically the Coordination properies)? If you have Deferred = YES and Automatic Query = YES then the child data block will not be queries until you navigate to the block.
    Craig...

  • Positional Polling a file with multiple records at single line

    Hi
    I am trying to poll a file with positional read.It works fine with single record at single line.But how to solve the problem when there are multiple records at single line???How to delimit the records??

    i have a file which contains emp records like empID,empName,Dept.And these records of fixed length.I need to poll this file wirh positional read.I used fixed length polling.It works fine when there is only 1 record at one line.But when 2 or more records on same line it takes first record correctly but could not understand the start of second record.
    for ex
    1 shital mktg
    2 priya finance
    it works when records are at separate line.
    but another case is:
    1 shital mktg 2 priya finance
    how to delimit these records??

Maybe you are looking for

  • HP Color LaserJet CP1514n Printer paper jam in tray 2 - How to clear same?

    HP Color LaserJet CP1514n Printer A page was torn in printing. Message: Clear jam in tray 2. Have been trying to do just that for over 2 hours. Any hint?

  • ICloud Status option doesn't display under View Options

    I've searched many threads and haven't found the answer to my question. The iCloud Status option does not display under my View Options (See pic). Any suggestions? Much appreciated.Thank you!! I have verified I am an iTunes Match subscriber. I have m

  • PR-Account Assignment Q G/L field is disabled.

    Hi All, At the moment when purchase requisitions are generated by the WBS element,Account assignment Q, in the Account assignment tab of the requisition, i see G/L account field being determined from the valuation class in Material master (stock acco

  • Sharing/Editing playlists between G5 and Macbook

    Hi all, What I'd like to do is this: I have my iTunes library on my G5. I would like to share not only the tunes....but also be able to edit the playlists over my wireless network using my MacBook. I have sharing enabled, and it does show up on the M

  • QuickTime Pro and .VRO files?

    So here's my situation. I recently transferred several VHS movies to DVD on a Samsung DVD/VHS recorder. I was able to play the movies back on that machine and also a Panasonic Blu-Ray player without any problems. When I attempted to try them on my ma