File Split based on Condition

Hello
I have a scenario where I get a file and need to split it into two based on a condition. Is it possible to accomplish this scenario at the file adapter configuration or do I need a mapping for this.
Sample File 
ABC1234asdfasfasdfasdfsdfasdfsdfsdfsdfasfsdfasdfsfasdfNewafasfsdfasfasdfasfafsdas
asfdasdfasfasdfasdf
asdfasdfadfasdfasfsd asdfsadfa fs
asdfasdfasfasdfasdfasdfadfsfafasfas
ABC1234asfdjoawejasdlfasdfasdfjsdfljasfjsfjaslfjasldfjasdlfsdOldfsdfadsfadfsdfasdffasdfasdfads
asdfasdfsdfa
asfdasdfasdfasdf
asdfsfasfsfsad
fasfasfasdffas
asdfasfsfa
asdfasfasfasdfas
ABC1234asfdjoawejasdlfasdfasdfjsdfljasfjsfjaslfjasldfjasdlfsdNewfsdfadsfsd23424324234234234
asdfsfasdfasfasfasfasfa
asdfasfasdfasfasfaasdfa
in the above content record always start with ABC1234 and it can have multiple sub records and it has a value new or old at column 120-123 in the first line of each record, it can have many sub records but I need to consider ABC1234 as the new record. I need to split the file into two, like one as newdata.txt and other as olddata.txt with new and old records respectively.
Files after the split should look like this
newdata.txt
ABC1234asdfasfasdfasdfsdfasdfsdfsdfsdfasfsdfasdfsfasdfNewafasfsdfasfasdfasfafsdas
asfdasdfasfasdfasdf
asdfasdfadfasdfasfsd asdfsadfa fs
asdfasdfasfasdfasdfasdfadfsfafasfas
ABC1234asfdjoawejasdlfasdfasdfjsdfljasfjsfjaslfjasldfjasdlfsdNewfsdfadsfsd23424324234234234
asdfsfasdfasfasfasfasfa
asdfasfasdfasfasfaasdfa
olddata.txt
ABC1234asfdjoawejasdlfasdfasdfjsdfljasfjsfjaslfjasldfjasdlfsdOldfsdfadsfadfsdfasdffasdfasdfads
asdfasdfsdfa
asfdasdfasdfasdf
asdfsfasfsfsad
fasfasfasdffas
asdfasfsfa
asdfasfasfasdfas
I appreciate if any one can help me with this.
Thanks in advance

Hi,
as stefan pointed already you can't do this using standard adapter functionality,
you can do it in mapping easily,convert below code in to UDF it will work.
String test = "ABCasdasasasABCadsfsddgfgABCggdgdgdgdgABC34343";
myString =test.split("ABC");
for(int i=0;i<=myString.length;i++)
System.out.println("MY STRING " + myString<i>);
Regards,
Raj

Similar Messages

  • Creating Files Dynamically based on Condition

    Hi Experts,
    I want to create a scenario in which I want to have N number of target files based on some condition.
    Suppose I have following Source structure .
    <ns0:MT_Employee_Src xmlns:ns0="urn://FileToFile_ERD">
       <Details>
          <EmpId>1</EmpId>
          <Name>Rabi</Name>
          <Designation>ABAP</Designation>
       </Details>
          <EmpId>4</EmpId>
          <Name>Satya</Name>
          <Designation>ABAP</Designation>
       </Details>
    </ns0:MT_Employee_Src>
    My requirement is I want to have 2 different target files based on EmpId.
    And this should be dynamic that means N number of EmpId in my source will create N number of files.
    Can anyone help me to solve this?
    Any kind of suggestion will be appreciated.
    Thanks
    Rabi

    Hi All,
    As my requirement was to create N files dynamically based on some condition so I first used 1:N multimapping without BPM.
    Then I followed RP's steps.
    Follow those steps
    1) in the message Mapping go to Signature T..Outbounded.
    2)later go back to main tab . you shoud create a mapping like this:
    3)<EmpId>--> change the context to MT_Employee_Src. to do that press right button on the field and go to context menu option.
    map this field to the proper header target structure E.X: MT_Employee_Tgt
    4) doing this you will create as many target files as <EmpId> you receive.
    5) map the rest of the fields
    This is great.And  this helped me a lot and finally gave solution.
    I want to share one thing that I faced.
    when you are doing 1:N multi-mapping then you have to change the occurrence of target .
    Then your source and target structure will be changed .If you are taking the source schema from mapping then remove the extra tags those got generated due to multi mapping such as
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    - <ns0:Message1>
    </ns0:Message1>
      </ns0:Messages>
    And then use the file and it will work fine.
    Thanks
    Rabi

  • File-splitting based on content.

    Hi Experts,
    This question is regarding file-splitting.
    Its a BAI2 file with multiple records in it.
    a)I need to split the file based on an identifier and make those many sub-files ( with header and trailer added to the file )
    b)And can we ensure we have the same name for the files? ( with a count suffixed in the end )
    The forum talks about BPM, Enhanced Interface/Receiver Determination, Message Mapping split etc..
    Which would be the best approach for this?
    Please advise.
    Thank you,
    Rakesh.

    Hi,
    Using Enhanced Interface/Receiver Determination approach is best one.
    1.If your version is 7.1 and above, you can also try using enhanced interface determination. Please go through the below link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90dcc6f4-0829-2d10-b0b2-c892473f1571?QuickLink=index&overridelayout=true
    2.In the Receiver Determination, you need to select " Extended" in the Type of Receeiver determination.
    Illustration of Enhanced Receiver Determination - SP16
    regards,
    ganesh.

  • File splitting based on 3 parameterrs

    Hello experts,
    my requirement: i have to split a file based on country, then number of records, and finally based on whether records or historical or inventory.
    I have done till splitting using country and number of records, ie, if the user specifies number of records, 50000, it will generate files containing 50k records.
    Now the new requirement states that on top country and number of records, i need to split the file bases on historical or inventory, the data will have HIS or INV prefixed for all the records.
    The user should have the ability ti split only on HIS or INV, he can specify both, HIS and INV. The logic should split accordingly.
    Please assist me in this,
    thanks and regards
    Abhishek

    Hi Abhishek,
    A case transform will work in your case where in you specify a match pattern for historical(HIS%%%) and Inventory(INV%%).
    You can also use a batch command script to rename the excel/txt files with HIS_%%% or INV_%% once the file has been loaded with data.
    Regards
    Arun Sasi

  • How to create additional Line in file based on condition available as part of ZINVOIC02 Idoc segment

    Scenario Details:
    Receiving Zinvoic02 Idoc in PI. Idoc to file translation creates comma separated file with .csv extn
    The logic was kept in such a way that how many E1EDP01 (items) are available in IDoc that many no of records will be created in csv file.
    The file logic for some the fields is as below:
    No of records
    InvNumber
    InvDate
    CusNumber
    LineitemDesc
    Tax1Type
    Tax1%
    for 1st E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    Populate when E1EDP04/MSKWZ=O2 or O4 with E1EDP19/KTEXT
    Hardcode when E1EDP04/MSKWZ=O2 or O4
    Sum all E1EDP04 /MSATZ when E1EDP04/MSKWZ=O2 or O4
    for 2nd E1EDP01
    E1EDK01-BELNR
    E1EDK01-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    for 3rd E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    Additional Line to be created when one or more of E1EDP01 is having E1EDP04/MSKWZ = O3
    same as above
    same as above
    same as above
    Hardcode "REIM for USE TAX"
    Hardcode ""
    Hardcode ""
    Now we have got addition requirement to add a new lineitem when tax code is equal to O3 for any of the E1EDP01.
    Is it possible to create additional lineitem based on condition. If yes, please share what should be the approach.
    How we can create the additional lineitem?
    Currently we are using E1EDP01 to do context handling.
    The target structure is :
    MT_FILE
         INVOICE     0..unbounded
              InvNumber     0..1
              InvDate          0..1
              CusNumber     0..1
              LineitemDesc     0..1
              Tax1Type          0..1
              Tax1%               0..1

    Hello,
    Please add one extra field in the data structure of the target mapping and let its occurrence be 0..unbounded under the root node 'MT_ADP_Invoice'.
    Apply the condition, if tax code MSKWZ (with its context changed to E1EDP01) equalsS to '03', then map it to the newly created target field whose occurrence is 0..unbounded.
    This will then create an additional field which is your requirement.
    The above is one way.
    But if you want to have the same target field name as ADP_File appended for tax field being '03'.
    Then in that case you can you two message mapping for one common operational mapping / interface.
    In the first message mapping you need to have one target data structure created with the source data structure remaining the same as the one shown by you in scrn shot. Now this target data structure will be similar to the source, except that you need to add one more field at the end(name different from other fields) in target (whose occurrence should be 0..unbounded), and it needs to be mapped to E1EDP01 provided the tax code field MSKWZ(its context changed to E1EDP01) equalsS to constant '03'.
    In the second message mapping you need to map the target structure of previous message mapping to the actual required structure. The newly added field should be mapped to ADP_File of your final target structure.
    This will then create the same structure as required.
    Note : Please change the occurence of ADP_File to 0..unbounded.
    Regards,
    Souvik

  • Spliting files based on condition using multi mapping with BPM

    Hi All,
    Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
    Thanks
    Govindu.

    Hi All,
    Sorry for mistake this question for Exchange infrastructure guys.
    Thanks,
    Govindu

  • XML File splitting in PI

    Hi all,
    We have a requirement that the receiving application can accept files only of size 2MB. So this is a limitation from the receiving application
    The source system is SAP ECC system and the receiving application is a legacy application.
    Technically it is a ABAP Proxy to File scenario. Receiving application can accept files only in XML format.
    SAP ABAP Proxy code is written in such a way to read all the records in a SAP table and the full table load is sent as an proxy xml message to PI, PI has to split this  full xml file  in to chunks based on some condition and then transfer it to receiving legacy application.
    Can we achieve file splitting in PI for XML files based on no.of records or size.
    Please share your inputs/pointers to provide the best solution to this requirement.
    regards,
    Younus

    Hi,
    Yes this can be done by the amount of records you send through at a time.
    So lets there is 10000 records. You might only send 200 at a time and that will keep it under the 2mb limitation.
    This is a simple if function on your nodes. Please see the links below that would help you.
    Split source message into multiple target messages
    Defining Message Splits - SAP NetWeaver Process Integration - SAP Library
    Configuring Mapping-Based Message Splits - Integration Directory - SAP Library
    Split mapping created no messages SAP PI 7.11
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b?overridelayout=t…
    Regards,
    Jannus Botha

  • File Splitting for Large File processing in XI using EOIO QoS.

    Hi
    I am currently working on a scenario to split a large file (700MB) using sender file adapter "Recordset Structure" property (eg; Row, 5000). As the files are split and mapped, they are, appended to a destination file. In an example scenario a file of 700MB comes in (say with 20000 records) the destination file should have 20000 records.
    To ensure no records are missed during the process through XI, EOIO, QoS is used. A trigger record is appended to the incoming file (trigger record structure is the same as the main payload recordset) using UNIX shellscript before it is read by the Sender file adapter.
    XPATH conditions are evaluated in the receiver determination to eighther append the record to the main destination file or create a trigger file with only the trigger record in it.
    Problem that we are faced is that the "Recordset Structure" (eg; Row, 5000) splits in the chunks of 5000 and when the remaining records of the main payload are less than 5000 (say 1300) those remaining 1300 lines get grouped up with the trigger record and written to the trigger file instead of the actual destination file.
    For the sake of this forum I have a listed a sample scenario xml file representing the inbound file with the last record wih duns = "9999" as the trigger record that will be used to mark the end of the file after splitting and appending.
    <?xml version="1.0" encoding="utf-8"?>
    <ns:File xmlns:ns="somenamespace">
    <Data>
         <Row>
              <Duns>"001001924"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001925"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001926"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001927"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001928"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001929"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"9999"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
    </Data>
    </ns:File>
    In the sender file adapter I have for test purpose changed the "Recordset structure" set as "Row,5" for this sample xml inbound file above.
    I have two XPATH expressions in the receiver determination to take the last record set with the Duns = "9999" and send it to the receiver (coominication channel) to create the trigger file.
    In my test case the first 5 records get appended to the correct destination file. But the last two records (6th and 7th record get sent to the receiver channel that is only supposed to take the trigger record (last record with Duns = "9999").
    Destination file: (This is were all the records with "Duns NE "9999") are supposed to get appended)
    <?xml version="1.0" encoding="UTF-8"?>
    <R3File>
         <R3Row>
              <Duns>"001001924"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
         <R3Row>
              <Duns>"001001925"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
         <R3Row>
              <Duns>"001001926"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</xtract_Code>
         </R3Row>
              <R3Row>
              <Duns>"001001927"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
              <R3Row>
              <Duns>"001001928"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
    </R3File>
    Trigger File:
    <?xml version="1.0" encoding="UTF-8"?>
    <R3File>
              <R3Row>
              <Duns>"001001929"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Ccr_Extract_Code>"A"</Ccr_Extract_Code>
         </R3Row>
              <R3Row>
              <Duns>"9999"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Ccr_Extract_Code>"A"</Ccr_Extract_Code>
         </R3Row>
    </R3File>
    I ve tested the XPATH condition in XML Spy and that works fine. My doubts are on the property "Recordset structure" set as "Row,5".
    Any suggestions on this will be very helpful.
    Thanks,
    Mujtaba

    Hi Debnilay,
    We do have 64 bit architecture and still we have the file processing problem. Currently we are splitting the file into smaller chuncks and processsing. But we want to process as a whole file.
    Thanks
    Steve

  • File name based routing

    Hello All,
    Here I have a scenario where based on the source file name PI should route it to corresponding Business system.
    There is no IR part as it is a pass through Interface. Instead of creating multiple channels can I check the condition(file name based condition) at Receiver determination level in ID part?
    Thanks,
    Regards,
    Moorthy

    Hello,
    There is no IR part as it is a pass through Interface. Instead of creating multiple channels can I check the condition(file name based condition) at Receiver determination level in ID part?
    Yes, you can use context objects and then select fileName, I'm not sure if you'll be able to use the extended xpath conditions. Probably that approach is limited to the approximately equals, equals, not equals condition.
    Corrections are welcome
    Hope this helps,
    Mark

  • Another case of file splitting

    Hello
    I need your help to find the easier way to develop this kind of interface :
    My source file have a variable number of records.
    I would like to create as target datastores as much files as sets of a kixed number of records :
    For example : This fixed number of records is 10 and my source datastore has 83 records :
    I would like to obtain
    9 files : the first with the first 10 records, the second with de 10 next and so on untill the last that will contain the last 3 records
    I guess I have to use a sequence ???

    Hi,
    Yea, you need to use sequence to do this task,
    Better to create the temp table for source file use sequence here(while uploading source file to temp table).From the table you can split it as mush file required based on number of records
    Thanks
    Madha

  • How to blink TreeView Nodes based on condition c#

    suppose i am populating my tree view with data from database and i want to blink those nodes which has a specific data. now guide me with code how can i efficiently blink multiple tree view nodes  based on condition in winform application.

    Hi Mou_kolkata,
    >> anyone can give me small working code for tree node blinking
    Thank Armin for the details about blinking TreeView Nodes.
    For a simple demo to blink TreeView nodes, you could refer the link below:
    # Treeview control - How to make a node blink?
    https://social.msdn.microsoft.com/Forums/en-US/64e7a4d7-3098-4370-990f-390cb3a640a1/treeview-control-how-to-make-a-node-blink
    If you have issues when you blink Treeview nodes, please feel free to post a new thread in this forum, then you would get more help.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I auto export a PDF File using the "Smallest File Size" preset and set the Exported File Name based on information from an Imported PDF?

    Greetings all,
    I am trying to create a script to automate a PDF export process for my company for inDesign. I’m fairly new to inDesign itself and have no previous experience with javascript, although I did take C++ in high school and have found it helpful in putting this code together.
    We have an inDesign template file and then use the Multi-page PDF importer script to import PDF files. We then have to export two version of each file that we import, then delete the imported file and all of the pages to reset the template. This has to be done for nearly 1000 pdf files each month and is quite tedious. I’m working on automating the process as much as possible. I’ve managed to piece together code that will cleanup the file much quicker and am now trying to automate the PDF exports themselves.
    The files are sent to us as “TRUGLY#####_Client” and need to be exported as “POP#####_Client_Date-Range_North/South.pdf”
    For example, TRUGLY12345_Client needs to be exported as POP12345_Client_Mar01-Mar31_North and POP12345_Client_Mar01-Mar31_South.
    There are two templates built into the template file for the north and south file that are toggled easily via layer visibility switches. I need to get a code that can ideally read the #s from the imported Trugly file as well as the Client and input those into variables to use when exporting. The date range is found in the same place in the top right of each pdf file. I am not sure if this can be read somehow or if it will have to be input manually. I can put North or South into the file name based on which template layer is visible.
    I am not sure how to go about doing this. I did find the following code for exporting to PDF with preset but it requires me to select a preset and then type the full file name. How can I set it to automatically use the “Smallest File Size” preset without prompting me to choose and then automatically input some or preferably all of the file name automatically? (If the entire filename is possible then I don’t even want a prompt to appear so it will be fully automated!)
    PDF Export Code (Originally from here: Simple PDF Export with Preset selection | IndiSnip [InDesign® Snippets]):
    var myPresets = app.pdfExportPresets.everyItem().name;
    myPresets.unshift("- Select Preset -");
    var myWin = new Window('dialog', 'PDF Export Presets');
    myWin.orientation = 'row';
    with(myWin){
        myWin.sText = add('statictext', undefined, 'Select PDF Export preset:');
        myWin.myPDFExport = add('dropdownlist',undefined,undefined,{items:myPresets});
        myWin.myPDFExport.selection = 0;
        myWin.btnOK = add('button', undefined, 'OK');
    myWin.center();
    var myWindow = myWin.show();
    if(myWindow == true && myWin.myPDFExport.selection.index != 0){
        var myPreset = app.pdfExportPresets.item(String(myWin.myPDFExport.selection));
        myFile = File(File.saveDialog("Save file with preset: " + myPreset.name,"PDF files: *.pdf"));
        if(myFile != null){
            app.activeDocument.exportFile(ExportFormat.PDF_TYPE, myFile, false, myPreset);
        }else{
            alert("No File selected");
    }else{
        alert("No PDF Preset selected");
    So far my code does the following:
    1) Runs the Multi-Page PDF Import Script
    2) Runs PDF Export Script Above
    3) Toggles the Template
    4) Runs #2 Again
    5) Deletes the imported PDF and all pages and toggles template again.
    It’s close and much better than the original process which was almost 100% manual but I’d like to remove the Preset prompt from the PDF script and have it automatically select the “Smallest File Size” preset. and then if there’s a way to have it auto-fill in the file name so no user input is required at all other than selecting each file to import. (If there’s a way to setup a batch action for the multi-import script that would be even better!)
    Thanks in advance and if there’s anything else I can provide that would help please let me know! Even a nudge in the right direction will be a big help!

    If you hold down the option key, it will typically show the location. Or you can often hit option-return on the file and it will reveal the file in the Finder, instead of opening it.
    Final option is to open it, and just option-click the filename in the toolbar of Preview and it should show you the location.
    It's probably an attachment to an email you've received. If you have Mail set to cache emails and their attachments it'll be stashed in a subdirectory of ~/Library/Mail. Which is fine.

  • How to give color to the display of keyfigure based on condition using exception.

    Dear Friends.
       I am trying to color "BAD3" in exception based on condition but my problem is in exception I can have only formula variable to compare the value, How to assign a value to formula variable in BEx Query designer.
    What I am trying to do is :
       in Query designer :
       I have PO Quantity and Delivered Quantity. 
      if PO Qnantity > Delivered Quantity
        then Delivered Quantity field should be colored as "BAD3" in exception.
    but here proble is in exception
      I have alert level , operator, and  value fields for Delivered Quantity keyfigure ( Under definition tab - Exception is defined on = Delivered Quantity ).
    but for value field I dont have PO Quantity for that I have to supply one formula variable,
    When I created a forumula  and did this way
    FV_PO_QUANTITY = PO_QUANTITY formula editor throws errors. I dont understand How to assign a value of key figure to formula variable and use it in EXceptions.
    Please help me How I can solve my problem
    I will greatly appreciate your any help.
    Thanking you
    Regards
    Naim

    Thank you so much for your replies,
      I did following way and it helped me to solve my issues.
      I created one formula and under formula I use boolean < funtion to compare the values.
    like following way.
    ( 'PO Quantity' > 'Delivered Quantity' ) * ( FV_PO_QNT + PO_QUANTITY')
    here fv_po_qnt is formula variable I supply that variable to exception and since I have the value in it.. it compares with Delievered Quantity value and colored the perticular cell.
    Thanks again for your replies
    Regards
    Naim

  • How to stop workitem complete or how to keep work item in inbox based on conditions even if it completed

    Hi,
    my requirement is to call webdyn pro screen from workflow..
    i am calling webdynpro screen by using FM :CALL_BROWSER from workflow.
    when webdyn pro screen is called user will enter some values . if user closed webdyn pro screen with out entering any values we need show this workitem in his inbox. so that user can again open it and enter values in the webdyn pro screen.
    Please help how to stop work item complete based on conditions.
    Thanks,
    phani

    Hi,
    As per my understanding, this is not a proper approach toy call web dynpro using FM CALL_BROWSER. is the web dynpro screen being called when user clicks on the work item from portal UWL OR from SAP SBWP ?
    if you are calling web dynpro screen from portal UWL when user clicks on work item link, better you achieve it using SWFVISU tcode. in SWFVISU tcode you can maintain which web dynpro. application to call when particualr work item task come in user's inbox. in your web dynpro code, then you can write your buisiness logic when user clicks for example SUBMIT/SAVE button. on action submit/save button you can use FM SAP_WAPI_WORKITEM_COMPLETE to complete the worktiem once the user clicks on final submit/save button. in this way the workitem will get removed from user inbox only upon clicking on submit/save button.
    You can refer below link for web dynpro for workitem:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70648e99-4cc1-2c10-879d-9c61003c69d6?QuickLink=index&…

  • File Based logging: Control file name based on calling service

    In the file logging, I need to change the "Prefix" and "Suffix" that I can type in, from page "FILE Transport Configuration" while creating
    business service with transfort: File. I need to be able to supply these values for the file name from proxy service activity.
    I am creating as logging proxy service which will be called from all the other proxy services. I am planning to use logging to File System based on
    BS for achieving this. I need to be able to create a new file with name that corresponds to the calling service. How can I achieve this?
    Also this service should be able to turn logging on or off based on the calling service. I should be able to turn off the logging completely or
    turn off the logging only for few services.
    What is the best way to achieve this?

    HI
    That means your file name would be decided at run time . so u can use adapter specific mesage attributes in ur communication channel
    please refer tto the same here
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    Dynamic File Name Part 2
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Maybe you are looking for