How count number of item records in a File: Idoc to File scenario

Hi All,
I am configuring an IDOC to File scenario.
Once all the IDOC data is dumped on a File, I need to calculate the number of Item records in this file and write this number at the end of the trailer record in the file.
Is theer a way to calculate the item data records(or say number of lines in the file) in the message mapping area. Or any other simple way to do it.
Appreciate your help on same.
Thanks
Shirin

hi,
Use the count function for ITEM node the assign this count value to the receiver field , keep the ITEM context to header!
Thanks,
Vijaya.

Similar Messages

  • Number of items/records display

    I want to set the number of items/records display base on query. I tried Set_Block_Property and Set_Item_Property, they don't have any option for me to set it dynamically. Any ideas?
    Thanks

    A couple:
    a) Set QUERY ALL RECORDS to YES, and programmaticaly set MAXIMUM RECORDS FETCHED.
    b) in a POST-QUERY block-level trigger, check the :system.trigger_record. When it reaches the number you want, issue an ABORT_QUERY built-in.
    Hope this helps,
    Pedro

  • How to use the DISPLAY RECORD Setup Command in an etext file?

    Hi All,
    How to use the DISPLAY RECORD Setup Command in an etext file?
    I want to display a <NEW RECORD> conditionally. The condition will be based on the data coming through from the xml file.
    Please help me with an example. The BI User guide also doesnt show any examples.
    Your help is appreciated.
    Rgds,
    Kiran Panditi

    Hi,
    You can use vb coding in BEx Analyser to calculate your unit price. For this you have to first display the attributes of your object "XYZ". Then you can use VB cosing to calculate the value for the unit price field.
    One more thing cna you clarify whether is it display attribute or variable ?
    Regards,
    Balajee

  • How increase number of items in sidebar

    I seem to be geting a roll over in sidebar items. Is there a limit, and, if so, how can the number of items allowed be increased?

    I don't know if an actual figure for the maximum
    number of sidebar items has been published, let alone
    how to increase the limit if there is one.
    I do remember someone posting that they could no
    longer add items to the bottom of the list after a
    certain point, but they could continue to add items
    to the upper part of the list. It seems that these
    zones also affect the ability to rearrange items as
    well - attempting to rearrange in the lower part
    causes the item to be removed with no option to
    cancel the action, whereas items in the upper part
    could be dragged around at will. I suppose at that
    point the ".plist" file could be edited manually if
    things in the lower part needed to be rearranged.
    Edit: Here's the post. This isn't an issue I'm
    familiar with, but there may be others if you try
    searching the forums...
    http://discussions.apple.com/thread.jspa?threadID=5064
    29
    Thanks! I will ty adding items to the top section and see what affect it has. I suspect there is a way to set the number of items. Hoeever, it is not life threatening, just anoying.
    Howard

  • Ship to party PO number line item field updating in ORDERS IDOC

    Hi Experts,
             We are in the process of creating the Sales order by receiving EDI data from customer and converting in to IDOC format and trying to create the sales order. While executing the ORDERS IDOC message type sales order is getting created successfully.
    But our requirement is, we want to store the customer contract details in the sales order. So we identified the "Ship to Party Purchase Order data" in ORDERS Tab in the sales order. While executing, in the Header level the Contract number is getting updated against Ship to party Contract number field.
            But during item level process, system is not updating the contract line item number field even though we maintained the value in E1EDP02-ZEILE for the QUALF 044.
    Note: The similar scenario, we want to capture the Customer Purchase order number & line item number. For this we maintained the value in E1EDP02-ZEILE for the separate QUALF, its working fine.
    Kindly give your valuable feedback on this issue also
    Regards,
    nag

    Hi
    See Note 753153 - FAQ: Customer-functions in IDOC_INPUT_ORDERS. Check if EXIT_SAPLVEDA_001 gives you any possibility to do it.
    I hope this helps you.
    Regards
    Eduardo

  • IDoc to file - how to delete a blank record at the end of the file.

    Hi,
    My senario is IDoc to file.  I have successfully implemented this using FCC. But when i checked the flat file, it has a blank record at the end of the file( i think PI adds one blank line/record at the end of the file).  Please suggest me What i need to do, to delete the blank record .
    Thanks & regards
    Sreeni

    Kindly Check below.
    Check whether the problem is at mapping level of  adapter level.. to do this count no. of rows/IDOC before mapping and after mapping in IE and no. of rows in the output file.
    Thnx
    Subbu

  • How to count number of items present in a data block

    hi all,
    how to count how many items present in a particular data block in oracle forms 10g.
    whether it is a text_item or display_item or list_item etc is there any method to do this.
    please reply....

    hi all,
    i have written this when-button pressed but the problem is how to get the next item name in the block
    DECLARE
         V_COUNT NUMBER:=0;
         V_FIRSTITEM VARCHAR2(100):='';
    BEGIN
         GO_BLOCK('BLOCK_ITEMCOUNT');
         V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
         LOOP
              V_COUNT := V_COUNT + 1;
              EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
              --V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
              --V_COUNT := V_COUNT + 1;
         END LOOP;
    END;

  • Count or "distinct count" number of items in SAP BI 3.5

    Hi all,
    I have a requirement that goes like this:
    In an ODS-object there are two characterisitics among others. Against each client there are several numbers of articles.
    01. I have to count the number of articles against each client.
    02. I have to count the number of distinct articles over all clients.
    Do you think there's a chance to solve BOTH requirements in Query Desinger only? I actually do NOT want to modify the respective ODS or MultiProvider configurations.
    Client --- Article --- Nr. of entries
    301 --- A1000 --- 50
    301 --- A2000 --- 100
    301 --- A3000 --- 50
    302 --- A1500 --- 50
    302 --- A2500 --- 100
    302 --- A3000 --- 50
    303 --- A2000 --- 10
    303 --- A3000 --- 50
    Following is a sample how the results should look like:
    Task "1":
    Client --- Nr. of different articles
    301 --- 3
    302 --- 2
    303 --- 2
    Task "2":
    Nr. of different articles over all clients
    5
    Any pointers about this are most welcome.
    Kind regards,
    Thorsten.

    Hi,
    I'm not sure the count function works in 3.5 since you can't set the proper aggregation setting. You can try the following however:
    Create a new calculated key figure
    In this, create a new formula variable
    Set the formula variable to replacement path
    Choose the infoObject you want to count as replacement object
    Set the replace by to attribute value
    Choose attribute reference, (constant 1)
    Use the formula variable in your calculated key figure.
    Hope it helps.
    Kind regards,
    Alex

  • How to pass header/item text in inbound ORDERS05 IDoc

    Hi,
    I'm trying to create Sales Order from an inbound ORDERS05 idoc thru SE19.
    How do I pass the header text and item text to the Sales Order?
    What should be the value of E1EDKT1-TDOBJECT and E1EDKT1-TDOBNAME?
    An early response is highly appreciated.
    Regards,
    Gajendra

    Hi Gajendra,
    What is the significance of "TDOBJECT" and "TDNAME"?
    <b>TDOBJECT</b>: application object of the text
    The field is part of the text key. It contains the name of the text object to which the text is allocated. This object must be defined in table TTXOB.
    <b>TDNAME</b>: name of the text
    The field is part of the text key. It contains the name of the text module. This name may be up to 70 characters long. An internal structure of the text name is preset by the text object, but not interpreted by SAPscript.
    <b>TDID</b>: ID of the text
    The field is part of the text key. It contains the name of the text ID to which the text module belongs. The text ID must be defined in table TTXID together with the text object.
    <b>TDSPRAS</b>: language key of the text
    The field is part of the text key. It contains the language key of the language used to enter the text lines of the text module. The language key must be defined in table T002.
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to hane n no of detail in File(idoc to file )

    Hi Experts,
    I have a scenario where 10 idocs are collected at XI and then processed to give a single file.
    File should have 1 Header   ,1..n Detail and 1 trailer
    What FC(conversion contents parameters) should i specify for Detail...to have it n no. of times.
    At recordset structure i mentioned this is this OK..
    HEADER,DETAIL,TRAILER
    Thanks
    Akhil
    Edited by: Akhil Rastogi on Mar 7, 2008 8:12 AM

    Hi,
    Refer the below weblog for FCC at receiver end.
    /people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    How u want ur file should be generated its fixed length or separated with some character.
    Thnx
    Chirag

  • Total number of items in a folder

    How do I find out the total number of items there are in a folder (including files within sub-folders)? Get info will show me the total size, but I'm sure there's a way of doing this but I can't remember how.
    Thanks - Neil
    G5 iMac 17 Rev. A/Superdrive/BT/768MB   Mac OS X (10.3.9)   1GB iPod Shuffle/20GB iPod with Colour Display

    Use the options in this thread.
    (11920)

  • How to Count Number of completed line items in past 6 months / 12 months ?

    How to Count Number of completed line items in past 6 months / 12 months ?
    Hi,
    I am trying to count "Number of Completed Line Items in Purchase Order Document" for my Key Figure ZPO_CNT.
    Purchase Order document = ZEBELN
    Line Item = ZEBELP.
    I need to find and count if the Line Item has been received in the past 6 months from today and similarly in the past 12 months.
    I have "Delivery Completed" field, ELIKZ.
    So, based on this would I be able to calculate it in Query Designer?
    If so, Please let me know how

    Hello Deva
    If youe want to calculate the completed line item for last 6 or 12 month then i think u will be displaying the query data for these montrhs...create a customer exit to give you date range and restric it in filter area....
    Now Choose any of the below option
    1. I would suggest to implement an additional key figure "counter" in cube and fill values with one for which delivery is completed.
    Now use calculated key figure in Query Designer based on logic
    IF counter = 1 THEN counter ELSE 0
    OR
    2. create a formula variable based on ELIKZ and use replacement path variable, it will display you no. of docs for which delivery is completed....
    Award points if it solves your problem
    Revert back in case of further assistance...
    Thanks
    Tripple k

  • Please let me know how to Count Number of completed line items in past 6 mo

    How to Count Number of completed line items in past 6 months / 12 months ?
    Hi,
    I am trying to count "Number of Completed Line Items in Purchase Order Document" for my Key Figure ZPO_CNT.
    Purchase Order document = ZEBELN
    Line Item = ZEBELP.
    I need to find and count if the Line Item has been received in the past 6 months from today and similarly in the past 12 months.
    I have "Delivery Completed" field, ELIKZ.
    So, based on this would I be able to calculate it in Query Designer?
    If so, Please let me know how
    Krishna

    Hi Experts,
    I dont have a defined Restricted key figure yet.
    I have populated 0COMPL_DEL(Delivery Completed Indicator)  and 0EBELN (Purchasing Document Number) and 0EBELP (Line Item Number in Purchasing Document) .
    This is what I think how I need to calculate:
    Number of completed line items in past 6 months:
    If  Delilvery Completed Indicator (0COMPL_DEL) = x, calculate No. of Line Items (ZPO_CNT) from 0CALDAY to 6 months
    and
    Number of completed line items in past 12 months:
    If  Delilvery Completed Indicator (0COMPL_DEL) = x, calculate No. of Line Items (ZPO_CNT) from 0CALDAY to 12 months
    Please let me know if the logic is correct. If so, how I can create this in report

  • Counting number of records in a data block

    hi folks,
    Simple question for you guys: How can I count number of records in a data block.
    In other words, say I have 10 detail records listed on a data block (one of my columns is a non-database item for entering a number). Now I just want to do somethin like:
    Select count(*) From <data_block> into lnRecCount
    Where <non-database column> <> 0 ;
    Can I do this in a button trigger? I can't get it to work?
    Thanks,
    bob

    You should make a routine that go through records of the block and count the records that agree with your condition.

  • How to send Sales Document Number and Item to BAPI_ACC_DOCUMENT_POST?

    Hello SAPients,
    We are using BAPI_ACC_DOCUMENT_POST to create an accounting document similar to what FB01 does, in FB01 you can type the number and position of a Sales Document even if you are using an Account Receivable account number. But in the BAPI, the  ACCOUNTRECEIVABLE table doesn't have a field to include those numbers. How should I pass the sales order number and item to the BAPI? I have tried several things but every time I receive more complicated error messages.
    Thank you in advance for your kind help.

    Let me know if you have any questions:
    Loop through your records and fill in the appropriate structure based on record type (GL, Vendor or Customer)
    IF NOT pcard_post_rec-zlsapac IS INITIAL.
        gt_gl_item-itemno_acc   = ls_posnr.
        gt_gl_item-gl_account = pcard_post_rec-zlsapac.
        gt_gl_item-comp_code = pcard_post_rec-zlsapco.
        "gt_gl_item-pstng_date = pcard_post_rec-zlgpsdt.
        gt_gl_item-pstng_date = gv_posting_date.
        gt_gl_item-doc_type = doctype.
        gt_gl_item-alloc_nmbr = ls_assignment.
        gt_gl_item-ref_key_3 = pcard_post_rec-zlgvend.
        IF pcard_post_rec-zlsapac < 500000.
          gt_gl_item-item_text    = ''.
        ELSE.
          gt_gl_item-item_text    = pcard_post_rec-zlguser.
        ENDIF.
        gt_gl_item-costcenter = pcard_post_rec-zlsapcc.
        gt_gl_item-orderid = lv_ordnum.
        APPEND gt_gl_item.
      ELSEIF NOT pcard_post_rec-zlsapven IS INITIAL.
        gt_ap_item-itemno_acc = ls_posnr.
        gt_ap_item-vendor_no = pcard_post_rec-zlsapven.
        gt_ap_item-comp_code = pcard_post_rec-zlsapco.
        gt_ap_item-alloc_nmbr = ls_assignment.
        gt_ap_item-ref_key_3 = pcard_post_rec-zlgvend.
        IF pcard_post_rec-zlsapac < 500000.
          gt_ap_item-item_text = ''.
        ELSE.
          gt_ap_item-item_text    = pcard_post_rec-zlguser.
        ENDIF.
        APPEND gt_ap_item.
      ELSEIF NOT pcard_post_rec-zlsapcus IS INITIAL.
        gt_ar_item-itemno_acc = ls_posnr.
        gt_ar_item-customer = pcard_post_rec-zlsapcus.
        gt_ar_item-comp_code = pcard_post_rec-zlsapco.
        gt_ar_item-alloc_nmbr = ls_assignment.
        gt_ar_item-ref_key_3 = pcard_post_rec-zlgvend.
        IF pcard_post_rec-zlsapac < 500000.
          gt_ar_item-item_text = ''.
        ELSE.
          gt_ar_item-item_text    = pcard_post_rec-zlguser.
        ENDIF.
        APPEND gt_ar_item.
      ENDIF.

Maybe you are looking for

  • How do i make a pure actionscript as simple native window?

    Hello @all anythings, I ask about a sample pure framework by Flex for Adobe Air. An Example: Window with customizable buttons - If i use boolen  for visible or invisible buttons like this: http://livedocs.adobe.com/flex/3/html/help.html?content=Part6

  • Restrict sms / imessage reply from lock screen

    I recently am new to the ios platform from Android, and the one thing that bothers me, is i have security set on the iphone - running ios 8. I see the message on the lock screen, but I am able to reply without having to unlock my phone. is there a wa

  • Item selection issue

    I have a 15" Retina Macbook, less than a year old. This issue started quite randomly but has increased in frequency. Without any warning I become unable to make a selection, ie cicking on a link etc. I am able to move the cursor around the screen but

  • Create, Save Delete Advice

    I am creating an application with potentially about 20,000 users. At the moment I have manually coded my insert, update and delete procedures in page processes, which I will probably move into the database later. I also have my page load coded manual

  • Regarding Alerts

    I did alerts with ALRTCATDEF....here...consider i am doing a file to IDOC scenario... everything went well in XI...but 51 status at ECC.. we dont get alert as it was successfull from XI point of view... other than ALEAUDIT...is there any other way we