Forum Discussion

amit_saroha's avatar
amit_saroha
New Contributor III
4 years ago

Issue while validating the pipeline

Hi All,

I am running into a strange issue where when I execute the pipeline it completes successfully but when validate it always errors out with the below message. Can you please suggest what is going wrong here and what I should do to correct it? I have uploaded the parent and child pipeline as well if you want to refer to it.

HCM Process Person Files_2022_07_12.slp (54.2 KB)

HCM Process Master_2022_07_12.slp (36.9 KB)

“error”:
“Cannot·lookup·a·property·on·a·null·value”
“reason”:
“Value·referenced·in·the·sub-expression·‘$input0.final_document.Pipeline_Status’·is·null”
“resolution”:
“Please·check·expression·syntax·and·data·types.”
HCM Insert Person File_2022_07_12.slp (25.1 KB)

3 Replies

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    minalbakore 

    Looking at the BAPI, I assume it is a custom BAPI/function developed. 

    Have you tried to test the BAPI within SAP, by passing the same input parameters and check if the BAPI returns something? 

    • minalbakore's avatar
      minalbakore
      New Contributor

      Yes, the same function is used in another application where its working fine. We are now trying to replicate the same on Snaplogic. We are also using the same credentials that are used in other application to access SAP BW system. Is there anything wrong with the way input parameters are passed from SNaplogic? Is there any other format that should be followed when calling SAP BAPI ?

      • SpiroTaleski's avatar
        SpiroTaleski
        Valued Contributor

        minalbakore 

        It could be the input parameters, or it could be that there is no data for the given input parameters. 

        In terms of input parameters. If you connect the upstream Mapper Snap to SAP Execute and validate, you will be able to see the input schema/parameters that SAP Execute(BAPI) snap is requiring. 

        From there you will be able to properly construct the schema. 

  • Hi minalbakore ,

    What SpiroTaleski suggested could be the solution. when I work with SAP snaps I also use the validation to see what they expect  from input schema/parameters.

    What I happen to use also in some use cases is to enable the check box 'Commit after BAPI execute' , so we end the statefull session and commit.

     

     



  • minalbakore's avatar
    minalbakore
    New Contributor

    Thanks, I checked as per your suggestions and input parameters are correct. 

    There is another issue, in some cases the Snap is failing with error - com.snaplogic.snap.api.SnapDataException: Invalid data value(s)'.

    Error view is enabled but again, its not returning anything in the output. 

    Error view:

     

  • minalbakore's avatar
    minalbakore
    New Contributor

    Hi All,

    Thanks for the suggestions provided so far. Its really helpful.

    After further analysis, we found that the SAP BW system doesn't have data for the input selection that's the reason output was empty when called from SnapLogic. So its fine.

    But now I am facing another issue, when calling one of the BAPIs, I am getting error as 'Invalid field value ORGUNIT_KEY for type Type Number'

    One field is defined as 'Number' in BAPI definition, but it has some records with '#' value. Due to this SAP Execute snap is failing in SnapLogic. I tried using Type Converter snap but its not working.

    What can be done in this case? Is there any other way to handle this?

     

     

     

     

     

  • SpiroTaleski's avatar
    SpiroTaleski
    Valued Contributor

    minalbakore 

    Glad to hear that you find the reason for the first "issue". 

    About this one, to me it looks like that the SAP Execute Snap is expecting String for the input parameter "ORGUNIT_KEY". 

    So, try to convert ORGUNIT_KEY as String either using Type Converter Snap or in a Mapper Snap, before the SAP Execute Snap, using to string function.   

  • minalbakore's avatar
    minalbakore
    New Contributor

    Hi All,

    Issue was due to wrong data type of the data that was being returned by the BAPI. In this case  field ORGUNIT_KEY was numeric however BAPI was returning it as # so this was failing in SnapLogic. It was resolved after correcting the code on SAP to return numeric data type value.

    Thanks

    Minal

  • Like SpiroTaleski and JensDeveloper suggest putting a Mapper Snap in front and then validating will show you the interface of the RFC and you can do the mapping there as well. Your RFC is custom built, (starts with a Z*) and therefore replicating your issue somewhere else will not be possible.

    If you can use Transaction SE37 in the SAPGui and execute the Function Module there to make sure you know what Input/Table fields have to be filled. Also, some input fields of RFC and BAPIs require leading zeros if you call them from outside.

  • rnbabar's avatar
    rnbabar
    New Contributor II

    You can remove the Type Convertor snap and use mapper where expression can be built to convert # to string, ie

    stringvalue.parseInt() and assign to field