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

Similar Messages

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How to create a line type in data dictionary

    How to create a line type in data dictionary?Please explain step by step?
    Thanks & Regads,
    Sairam

    Hi,
    the details abbout the line type.
    The line type of a table type can be defined by:
    o Specification of a type that already exists (data element,
    structure, table type, table, view) whose properties are then copie
    as properties of the defined table line.
    o Direct type input, where data type, number of positions, and, if
    required, decimal places, are entered directly.
    o Specification of a reference type.
    and SE11 and click on datatype and click on table type and enter the line type.
    Thanks
    Shiva

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • How to create database from .sql file

    how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
    ho to do it..??

    why do you want to do this from java?
    i just don't see the point.
    find your dba and have him/her run it for you

  • How to create a service entry sheet based from the PO

    how to create a service entry sheet based from the PO
    Gurus,
    I am creating a service entry sheet from the PO but I am getting an error of u201CPlease maintain services or limits Message no. SE029- Diagnosis(You cannot enter data until the PO item has been maintained correctly) u201C
    The document type of the PO is standard NB, account assignment category is Q- (Proj make to order) and the item category is D(service). Then I am trying also create a PR using account assignment category is Q- (Proj make to order) and the item category is D(service) but still cannot proceed, a message asking me to enter a service entry number. What I know the process is create a PO(maybe based from PR) then post the GR then create a service entry sheet in ML81N but I cannot proceed. Just creating a PR or PO using those mentioned account assignment and item category and getting an error of need to enter a service entry sheet number.
    Please help.thanks!

    HI,
    Process for Creating Service Entry Sheet
    Transaction Code :    ML81N
    1)To open the respective Purchase Order, Click on the u2018Other Purchase Orderu2019, then enter the Purchase Order No.
    2)Click on the u2018Create Entry Sheetu2019 icon(3rd Icon on Top-Left)
    3)Give Short Text (e.g. R/A Bill No. 1) and top service entry sheet number also generated.
    4)Click u2018Service Selectionu2019 Icon on the Bottom of the Screen.
    5)For the 1st Time, when we are making Service Entry Sheet for a respective Purchase Order, we need to u201CAdopt Full Quantityu201D by clicking the Check box next to it, then Enter.  (*For the next time, no adoption is required, just continue)
    6)Select the respective Services by clicking on the Left Hand Side, then Click u2018Servicesu2019 (Adopt services) icon on the Top.
    7)Give the completed Quantity, then Click u2018Acceptu2019 icon(a green flag on the top)
    8)Save .
    9)Service Entry Sheet is SAVED and account posting made.
    Hope, it is useful for you,
    Regards,
    K.Rajendran

  • How to create and sign CAB files info on Supplement Option

    To all Supplement Option subscribers:
    At the supplement option for iDevelopment Accelerators, I uploaded a zip with detailed info on how to create and sign CAB files (necessary when you are running your application on the Native IE Java Virtual Machine).
    Not all functionality provided to you through JInitiator will work (e.g. WebUtil doesn't) but the way how to make and sign a CAB file will become more easy.
    Cheers,
    Marc Vahsen
    Headstart Team

    This defeats the purpose of trying to centralize SAP-related web resources on the SAP server. Typically IIS/Apache or other non-SAP servers are under the control of IT and not the SAP BASIS group.
    We simply would like to have a centralized location to store static web files so that they are not overwritten during Portal support pack applications.

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • How to create a new excel file using Excel Destination when Destination file not exists.

    how to create a new excel file using Excel Destination when Destination file not exists.

    Just need to set an expression for excel connectionstring and set delay validation to true and it will create it on the fly.
    The expression should return the full path with dynamic filename in each case.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to create a split zip file?

    Hi,
    Does anybody know how to create a split zip file using only Java?
    Lets say I have a file that compressed has a size of 10MB and I need to split it into small files of 1MB each... and then be able to open and uncompress it using winzip or any other compressing tool.
    I know how to create a zip file using java.util.zip but I cannot split it...
    Thanks,
    Ignacio

    IgnacioKriche wrote:
    Thanks for the philosophical advice...
    Can anyone help me? Does anyone know if Java API java.util.zip can split a zip file?I'm 99.9 % sure that there is nothing in the Java ZIP APIs to do this but I'm 100% sure I can't be certain.

  • 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

  • How to add additional lines to the Order Form template?

    I purchased and installed Acrobat Pro 9 because of its ability to create forms and found the Order Form template is just perfect for what I need, why reinvent the wheel, right?   Except I found I can't figure out how to add additional object that duplicate what is already there.  I highlighted an entire row and tried to just copy and paste but the past function put the copied objects at the bottom of the form in what looks like a group, all out of order.  I tried looking in the online help for a possible key combination that would inset an additional row of objects but couldn't find any.
    Also the form doesn't move down and create a new page keeping all the other elements in line, it moves to the bottom of the current page and stops.   Thought the template was based on a table so I was going to insert additional rows thinking once it reached the bottom of the current page it would automatically break to a new page and continue, but it's not a table.  So my question is, how can I add duplicate object that match the Order Form templates Item, Description, etc. objects?  I've come to realize learning to use this product is not going to be as simple a proposition as I was lead to believe.  O well, live and learn!
    If someone can point me in the right direction, any help is greatly appreciated.
    Tony Rodriguez

    Thanks, Barney! It's even easier than the solution I came to: copying and pasting into the field. 

  • How to create a data load file from Excel !!!

    Hi All,
    I'm new to HFM and would like to load data into an HFM application. As I have an Excel file with all the data. When I'm directly loading the data it throws an error saying "No section has been specified to determine if this is data, description or line item detail". How can I convert this excel file into proper format (.dat) file understandable by HFM ?

    There are several ways to get this data into HFM.
    1) FDM - best option if you have it
    2) Webforms/Data Grids
    3) HsSetValue formulas in Excel
    4) DAT file loads
    5) JVs, etc
    If you wish to use DAT files created via Excel, you will likely want to use Excel VBA macros to create your DAT file to load. We do this on occasion for special projects and it works quite well. What you can do is set up an Excel file with your data inputs to look however you want, then link your POV members and amounts to another tab (we commonly call this the Export tab and it is set up in an HFM-friendly format).
    Create a macro to write a DAT file to a specified location using data from the Export tab. The DAT file will need to be formatted as below. For a specific sample, you can extract data from your HFM app and see the format.
    !Data
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Scenario;Year;Period;View;Entity;Value;Account;ICP;Custom1;Custom2;Custom3;Custom4;Amount
    Brush up on Replace, Merge, or Accumulate load options in the HFM Admin and User Guides, then upload your new DAT file.

  • How to create trend line in cfchart?

    I can create a scatter chart in cfchart - but I do not know how to create a linear regression trend line in the same chart as a second data series. Kodemonki provided an answer in a forum discussion a few years ago (http://forums.adobe.com/message/192848#192848) - but I am not able to make it work (I have a dangerously small knowledge of coldfusion and statisitcal formulas). Can someone tell me where i put in my to data query variables - such as for a query that gives results for two data fields, "Item1" and "Item2".
    Here is Kodemonki's solution:
    <!--- The min setting is a preference based on how you want the data to be displayed. --->
    <!---<cfset min = arrayMin(grabData["value"]) - 5>--->
         <cfset min = 0>
         <cfset max = ceiling(arrayMax(grabData["value"])) + 1>
         <cfset n = grabData.recordCount>
         <cfset sum_x = 0>
         <cfset sum_x2 = 0>
         <cfset sum_xy = 0>
         <cfloop from="1" to="#grabData.RecordCount#" index="i">
              <cfset sum_x = sum_x + i>
              <cfset sum_xy = (i*grabData.value[i]) + sum_xy>
              <cfset sum_x2 = sum_x2 + (i*i)>
         </cfloop>
         <cfset sum_y = arraySum(grabData["value"])>
         <cfset slope = round(((n*sum_xy) - (sum_x*sum_y))/((n*sum_x2) - (sum_x*sum_x)))>
         <cfset intercept = round((sum_y - (slope*sum_x))/n)>
         <cfset best_fit = QueryNew("id, value")>
         <cfloop from="1" to="#grabdata.RecordCount#" index="i">
              <cfset queryAddRow(best_fit)>
              <cfset value = round((slope*i) + intercept)>
              <cfset QuerySetCell(best_fit, "id", grabData.xlabel[i])>
              <cfset QuerySetCell(best_fit, "value", value)>
         </cfloop>
         <cfchart scalefrom="#min#" scaleto="#max#" title="#GrabDatapointInfo.label#" format="jpg" chartHeight="450" chartwidth="500" xaxistitle="Month/Year">
              <cfchartseries type="line" query="best_fit" valuecolumn="value" itemcolumn="id"/>
              <cfchartseries type="line" query="grabData" valuecolumn="value" itemcolumn="xlabel"/>
         </cfchart>

    Have you read the docs for CFCHART, CHCHARTSERIES, etc?  Did you mess around with the example code sufficiently so you understand how the tags work?
    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-79 30.html
    Adam

  • How to create 2 lines header in Report painter

    Hi. I am not good at Report painter. I want to create 2 lines header in Report painter just like SAP std report.
    When I create a new form, I only have one line header form but cannot add additional header line.
    I am looking at the 0SAPFS10-01 Trans.Fig.- Balances. which has two header lines
                               Debit              Credit            Balance       Accumulated Balanc
    Periods                     &1FY               &1FY               &1FY               &1FY
    I can create only one header just like
    Periods                 Debit              Credit            Balance       Accumulated Balanc
    cannot add additional line for
          &1FY               &1FY               &1FY               &1FY
    please advise me
    thanks in advance.

    In report painter you can select variouselements based on which the data will be pulled. I haven't seen any report painter with two header lines and don't think report painter allows that. But for your requirement I believe you can select the periods in the header line itself.

Maybe you are looking for