IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
Expand all | Collapse all

RFC error does not fail map

  • 1.  RFC error does not fail map

    Posted 12/06/05 04:35 AM

    Originally posted by: SystemAdmin


    Hi
    I have a map that uses the ALE adapter to send IDOCS to SAP.
    It works fine most of the time but I noticed that if something fails in the
    adapter then it will not fail my map.
    I sometimes get an error saying :
    ItAppLine(IDOC_DATA_REC_40) = 02b268ac
    Data record has incorrect length (989 bytes read, 1063 bytes expected).
    Run Terminated at 07:28:00.606 on 12/06/05
    but my map will look like it completed succesfully.
    This is the rule I use to put the IDOC :
    =VALID(
    PUT("ALE","-c "CLIENT Column:SAP_Connection_Data_Orders" -u " USERNAME Column:SAP_Connection_Data_Orders" -p "PASS Column:SAP_Connection_Data_Orders" -h "IP_ADDRESS Column:SAP_Connection_Data_Orders" -s "SYSTEM_NUMBER Column:SAP_Connection_Data_Orders " -TV HubV2_Purc_SapPUT.mtr",PACKAGE(BuildPurcIDOC))
    ,FAIL("HubV2_Purc_SAP failed to put file: "+LASTERRORMSG( ) ))

    Any input would be appreciated.
    Thanks
    Alex
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: RFC error does not fail map

    Posted 12/06/05 05:05 AM

    Originally posted by: SystemAdmin


    Don't use PUT, it has very limited error handling, better to use a RUN map, or pass the data to another output card that has ALE as the target.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: RFC error does not fail map

    Posted 12/06/05 05:16 AM

    Originally posted by: SystemAdmin


    Hi JSmoley,
    Thanks for your input.
    I dynamically build the adapter string in the map.
    Is it possible to set the output card adapter settings at run time (if I choose to go for an additional output card) or is it in that case better to go for a RUN map?

    Alex
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: RFC error does not fail map

    Posted 12/06/05 06:17 AM

    Originally posted by: SystemAdmin


    A RUN map would be the way. Have the RUN map have the same adapter chosen, and use a test string so that it can be tested outside of the main map. Make sure the work area is unique or in memory. If passing a lot of data (more than 10 meg) set the card that has the RUN statement to file and !create to save RAM, and set StreamMaxMemLimit in your .ini file to 20 meg.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: RFC error does not fail map

    Posted 12/06/05 12:41 PM

    Originally posted by: SystemAdmin


    Thank you that is very good input.
    Just one additional question. What is the format of the run call. I assume it is something along the lines of :
    =VALID(
    RUN("Run_Blob.mmc",ECHOIN(1,TEXT(BuildPurcIDOC))+" -OAALE1' -c "CLIENT Column:SAP_Connection_Data_Orders" -u " USERNAME Column:SAP_Connection_Data_Orders" -p "PASS Column:SAP_Connection_Data_Orders" -h "IP_ADDRESS Column:SAP_Connection_Data_Orders" -s "SYSTEM_NUMBER Column:SAP_Connection_Data_Orders"'"),
    FAIL("HubV2_Purc_SAP failed to put file." + LASTERRORMSG())
    )
    I am a little unsure of how to specify the output card stuff.

    Alex
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 6.  Re: RFC error does not fail map

    Posted 12/07/05 12:27 PM

    Originally posted by: SystemAdmin


    Should be similar to the PUT command. You just have to watch out for syntax.

    RUN map's target should be the same adapter as the over ride, or file, to allow you to set transaction settings. Sink adapter doesn't have them.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 7.  Re: RFC error does not fail map

    Posted 12/08/05 02:26 AM

    Originally posted by: SystemAdmin


    Hi,
    Got the run map to work. Had to use OMALE1 to override the output.
    However when the run map fails to deliver the IDOC it still does not fail the "parent map". I have the run call in valid/fail statements.
    I get the following in the run map trace
    ...Data record has incorrect length (989 bytes read, 1063 bytes expected).
    Run Terminated at 04:57:02.595 on 12/08/05...
    I have tried both commit and rollback in the "on failure" setting of the run map. I can not seem to get the parent map to fail.

    Alex
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 8.  Re: RFC error does not fail map

    Posted 12/08/05 03:41 AM

    Originally posted by: SystemAdmin


    Try using PACKAGE instead of TEXT. Turn on the audit log (unique) for the RUN map to see if it thinks it is failing.

    Make a test where the RUN map has the correct data in it's output card and you don't over ride the adapter, does it still not fail?

    Use the same run map and leave it's input as file, so that your command line is basically VALID(RUN),FAIL() with nothing pased to the map. Remember, the adapter talks to the SAP gateway. If the gateway accepts the data and there is no error from SAP at the time the map will complete successfully. You might want to add (in the over ride) the -t and -ar3 trace options.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 9.  Re: RFC error does not fail map

    Posted 12/08/05 06:03 AM

    Originally posted by: SystemAdmin


    That is odd. I have added -TV and -AR3. It looks like it thinks it processes correctly but in the trace it says that it read 989 bytes but expected 1063.
    I will try your other suggestions.

    Thanks
    Alex
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 10.  Re: RFC error does not fail map

    Posted 12/08/05 07:25 AM

    Originally posted by: SystemAdmin


    Looks like your not sending enough data. Have you checked the size of BuildPurcIDOC?
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 11.  Re: RFC error does not fail map

    Posted 12/08/05 07:28 AM

    Originally posted by: SystemAdmin


    BTW, what version of DS TX and which SAP Pack are you using? What SAP gateway version?
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 12.  Re: RFC error does not fail map

    Posted 12/08/05 04:10 PM

    Originally posted by: SystemAdmin


    I recall having the exact same problem of insufficient length in working with SAP years ago. I vaguely recall it wasn't sending a trailer?? Perhaps because the process building the trailer erred out?? Something was failing to get built but I'm not sure what it was. I t was 75 or 76 bytes though.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 13.  Re: RFC error does not fail map

    Posted 12/08/05 08:02 PM

    Originally posted by: SystemAdmin


    We have performed extensive testing with the R/3 Adapter. Hopefully the following items are found to be helpful.
    1. Build a utility map (ie. sap_idoc_writer.mmc). Input card is a blob that will accept the idoc. Output card will contain the R/3 adapter with either dummy type adapter settings or R/3 proper values (hopefully) via Resource Registry. A VERY IMPORTANT setting that must be on the output card is the 'on failure' setting -- should be set to "commit" vs. rollback. Yea, sounds strange but this came via recommendation of tech. support. We have definitely proven, without this card setting, SAP conditions such as lock table overflow are not detected and passed back the calling chain. This leads to lost / missing idocs?? This also assures all application maps recover properly via the central setting/utility. All application maps issue a RUN to sap_idoc_writer and can override the R/3 output card values, as needed but the 'on failure' setting remains - better yet have the apps. call/run via use of Resource Registry (again better central control).
    2. On the idoc length error, be sure the metadata idoc file was exported from SAP, specifying the proper release level of your sap system. Also, upon import, be sure to import EDI or ALE depending upon situation. idoc control records are 1063 length, something less could possibly be a missing (key) field or a padding issue in the idoc type tree definition.
    3. I saw mention of the SAP Gateway for this inbound issue --- be aware - the gateway does not come into play for SAP Inbound idocs --- the host is targeted directly via host, r3 name, and system # parms. Gateway is used for outbound only.
    4. Be careful when using the VALID vs. testing for good RC (0), when attempting to detect command success/failure. ie IF(RUN(my.map....) != 0,FAIL("Error: LASTERRORCODE() + LASTERRORMSG() ...etc. vs. VALID(RUN ........., FAIL(?) .... sometimes one way works as you expect but other cases --- NOT. Definitely test/simulate error to assure expected results.
    Kind Regards, TIM
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 14.  Re: RFC error does not fail map

    Posted 12/09/05 03:51 AM

    Originally posted by: SystemAdmin


    Thank you that was very helpful. I will go through some of my other SAP maps and doublecheck the settings there.
    Based on your input I have tried both ways of detecting success/failure.
    I can still not get the parent map to fail even with the "on failure" setting set to commit, because the run map thinks it completes succesfully.
    I am not sure yet what the exact cause of the failure is. I have processed at least 5000 messages with the map and of them maybe 5 have failed.
    That lead me to believe that it was a data related issue but nothing in the data of the failed messages stands out.

    One thing I did notice in the RFC trace though was this line :
    Send RFCHEADER: 01/LIT/IEEE/SPACE/1100
    Send UNICODE-RFCHEADER: cp:1100/ce:REJECT/te:REJECT/cs:1/rc:0x00000023

    To me it sounds like something went wrong there but maybe that is just the adapter testing whether it is a unicode enabled connection.

    I went ahead and opened a case with support.

    Thanks for the great input.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 15.  Re: RFC error does not fail map

    Posted 12/09/05 06:25 AM

    Originally posted by: SystemAdmin


    Part of the problem is the DS TX version and SAP pack you are using. 6.7.x is not compatible with SAP 6.x. The type trees do not get created correctly, or if you are using trees from 4.x SAP, they don't match either.

    You should have DS TX 8.0 and SAP Pack 7.3.2.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange