12 Replies Latest reply: May 15, 2014 10:08 AM by fatboy02 _ RSS

    Quick question regarding SAP report

    fatboy02 _

      I have an SAP report that lists inventory differences and the field size of gain/loss/net vary each week given the adjustment quantities or dollars (ie, $10,000.00 is a longer field to capture than $10.00--this is not my trap field).  I have no problem trapping the data and getting what I need but the model I save is only accurate for that particular run of the report.  I'm not all that skilled with Monarch so my solution thus far has been is to open the saved model and 'edit template' to drag and increase/decrease the fields that are off (most all of the fields are static width but these few always seem to vary).  Is there a better way?

       

      Thanks

        • Quick question regarding SAP report
          Data Kruncher

          The best (only?) way that we could provide assistance for such a challenge would be if you could provide a sample. Replace all of the figures with 9s if necessary.

           

          It seems to me that SAP extracts are delimited by | characters, though I've never used it, so I'm uncertain if this is your situation.

            • Quick question regarding SAP report
              fatboy02 _

              I should be able to provide a sample tomorrow but until then, let me try this visual

               

              xxxx

              xxxxx

              xxxxx

              000000

              000

              xxxx

              xxxxx

              xxxxx

              0000000000

              00

               

              The X are constant width and capture just fine--the 0 are variable width depending on the cell value so I have to adjust my field with each version of the report to capture the correct width to keep things in alignment.  If that doesnt make sense hopefully my sample will...

                • Quick question regarding SAP report
                  Olly Bond

                  Hello Rob,

                   

                  We work with these reports a lot - I think they are called Dynamic List Displays in SAP - and the trick is to use the | character as a floating trap. This isn't normally possible in Monarch, as the | character has a special meaning as the numeric or trap. You need to change the trap character options in the Options > Input dialog to use the alternate trap characters. These were introduced in Monarch v9.

                   

                  Hope this helps,

                   

                  Olly

                    • Quick question regarding SAP report
                      Data Kruncher

                      While Olly's recommendation works like a charm for v10.5, and the alternate character set was indeed introduced with v9, v9 users (not you Rob) won't be able to use the pipe character | with floating trap templates. V9 displays the "Numeric OR is not allowed with Floating Trap." warning, even after the alternate trap characters have been selected.

                        • Quick question regarding SAP report
                          warlok

                          A simple solution may be to load the file into a strong text editor such as TextPad and replace all the | characters to one that you could use better within your Monarch project. It does add an extra step to your work but in a pinch it should get  you going where you need to go.

                            • Quick question regarding SAP report
                              Data Kruncher

                              That's another good recommendation Warlok, but Monarch Pro users shouldn't need to go that far.

                               

                              If the trapping becomes difficult, they have the option of reading the file as a database source and specifying that the pipe characters are field delimiters. You might get some extra fields with the gaps in Rob's example, but they can be deselected for input, or simply ignored (if one isn't trying to import too many fields in a record).

                               

                              It's great that there are so many options available to us now. That certainly wasn't the case with previous versions of Monarch software.

                                • Quick question regarding SAP report
                                  Olly Bond

                                  Hello everyone,

                                   

                                  I wasn't going to mention the details, assuming that everyone here had v10, but Kruncher's quite right, Monarch v9 as shipped does throw an error with alternate trap characters using the pipe (there are workarounds). But after my colleagues at the EPO reported this, Monarch build 9064 was developed as a patch to fix it. If you have v9, and want to use this approach, I'm sure that Datawatch would be happy to make it available.

                                   

                                  Textpad, or better yet, MSRP as it's easy to control via a batch file, would be an alternative approach, but only if you wanted to change the pipes (|) in every line of the report.

                                   

                                  Best wishes,

                                   

                                  Olly

                                    • Quick question regarding SAP report
                                      fatboy02 _

                                      OK, let me try to explain this as best I can. 

                                       

                                      I pasted together reports for two months for one material to show the possible variations

                                       

                                      The first 5 columns are static width.

                                      Column 6 can vary in width given the inventory value but usually does not cause me any issues.

                                      Columns 7-9 are fixed width

                                      Column 10 could be wider but extremely unlikely

                                      Column 11--fixed

                                      Columns 12-17 are where the report typically gets out of line for me.

                                       

                                      My solution thus far has been to simply open my previous model, edit template and insert a new sample line, push, pull and resize.  I've been playing around with the floating trap but havent succeeded with it yet (I'm a newbie to the floating trap but trying to learn so I don't have to go through this manual process each week/month).  Is a floating trap the correct method for this example?

                                       

                                       

                                      -


                                      Plnt

                                      CC

                                      SLoc

                                      Material

                                      Profit Ctr

                                      SLOC Val(E

                                      Count = 0

                                      Count = 1

                                      Count > 1

                                      Total Coun

                                      CC fix

                                      Plus Diff

                                      Minus Diff

                                      Net Diff V

                                      Total Diff

                                      Percent Di

                                      $ Value Co

                                      Crcy

                                      Created On

                                      Last Ct Da

                                      Last mvmt.

                                      Typ

                                      MTyp

                                      Material Description


                                      xxxx

                                      B

                                      5510

                                      100064018

                                      1097510055

                                      528,699.710

                                      1

                                      0

                                      0

                                      0

                                      X

                                      0.000

                                      0.000

                                      0.000

                                      0.000

                                      0.000

                                      0.00

                                      USD

                                      12/22/2008

                                      08/31/2010

                                      09/14/2010

                                      PD

                                      ZFBM

                                      Sand-Premium White-40/70, bulk

                                      xxxx

                                      B

                                      5510

                                      100064018

                                      1097510055

                                      135,604.810

                                      0

                                      0

                                      1

                                      8

                                      X

                                      0.000

                                      26,039.660

                                      26,039.660-

                                      26,039.660

                                      0.397

                                      6,564,319.30

                                      USD

                                      12/22/2008

                                      08/31/2010

                                      09/14/2010

                                      PD

                                      ZFBM

                                      Sand-Premium White-40/70, bulk

                                      /code

                                        • Quick question regarding SAP report
                                          Data Kruncher

                                          Rob,

                                           

                                          You can absolutely trap this with a single model using a floating trap and you shouldn't need to adjust every time that you use it.

                                           

                                          Here's the contents of my Table window:

                                          PLNT  CC   SLOC   MATERIAL   PROFITCTR    SLOC VAL  COUNT0  COUNT1  COUNTGTR1  TOTALCOUNT CCFIX   PLUSDIF   MINUSDIF      NETDIF  TOTALDIF  PCTDIF  DOLLARVALUE CRCY  CREATEDDATE  LASTCTDATE  LASTMVMT   TYP  MTYP  MATERIALDESC                  

                                          xxxx  B    5510  100064018  1097510055  528699.710       1       0          0           0 X         0.000      0.000       0.000     0.000   0.000         0.00 USD   12/22/2008   8/31/2010   9/14/2010  PD   ZFBM  Sand-Premium White-40/70, bulk

                                          xxxx  B    5510  100064018  1097510055  135604.810       0       0          1           8 X         0.000  26039.660  -26039.660  6039.660   0.397   6564319.30 USD   12/22/2008   8/31/2010   9/14/2010  PD   ZFBM  Sand-Premium White-40/70, bulk

                                           

                                           

                                          /codeFirst I turned on the alternate trap characters in the Options->Input dialog.

                                           

                                          Next I used your first data line as the sample text for the template. I then added every single | character that appears in the line in the appropriate position, and turned on the Floating Trap option.

                                           

                                          To exclude the header, I used three ^ traps (alternate Blank traps) starting in position 53. Then I used the Auto-define Fields feature to paint all of the fields. Nice and quick. It didn't pick up the Plant field so I added it.

                                           

                                          For the next step, click in the Plus Diff field and then click the Shift Left icon until the field fills the space between the pipes. Notice that the field automatically sizes. Again, nice!

                                           

                                          Repeat the size adjusting for all fields as necessary. When the painted field field fills the space but you still need more width, double click the field and set the template width arbitrarily to 20. In retrospect I probably should have selected the line with the wider fields for the template and you wouldn't need to adjust like this.

                                           

                                          When the sizing exercise is done, go back and name each field. That's it, that's all.

                                           

                                          Review pretty meticulously for your real data at least the first couple of times, but I'm reasonably confident that it'll be just fine.

                                           

                                          Questions?

                                           

                                          Edit: I noticed that some of the numeric fields were auto-detected as Character types, so you'll probably need to adjust those too.