Automate

 View Only
  • 1.  Query T-codeZD51

    Posted 20 days ago
      |   view attached

    I am trying to write a query using T-code ZD51. When I enter it manually, I receive results from the t-code. I went in created the query first by recording then by tables and neither one is resulting in any records found. 

    The purpose of the Query is below. 

    Inputs for Query from IDOC Error Report 

    1. Sold to Party-KUNNR: 

    1. Payer/ Headquarter Number-KUNNR: 

    1. Customer Material Number-KDMAT 

     

    Outputs from Query from ZKNMT Table accessed by ZD51 T-Code 

    1. SW Material Number-MATNR 

    1. CMIR Key-ZZCMIR_KEY:  

    1. Created At-CRTIM 

    1. Created By-CRNAM 

    1. Time Changed-AETIM 

    1. Name of Person who changed the object-AENAM 



    ------------------------------
    carlos Carlos.Velez
    Southwire
    ------------------------------

    Attachment(s)



  • 2.  RE: Query T-codeZD51

    Employee
    Posted 19 days ago

    Hi Carlos

    If you are getting results manually, you might check padding on the criteria - does it need to be zero padded or not and the length.

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    Precisely Software Inc.
    ------------------------------



  • 3.  RE: Query T-codeZD51

    Posted 17 days ago

    I have tried the no padding and padding both option produce zero results. 



    ------------------------------
    Carlos Velez
    Southwire
    ------------------------------



  • 4.  RE: Query T-codeZD51

    Employee
    Posted 7 days ago

    Hi Carlos,

    I recommend going to the Criteria tab and doing a preview run without any filters to see the format of the data coming from SAP. The preview run will only show the first 100 records. I'm not able to replicate your script since it's a custom table, but I used the KNMT table which has some of the fields you're using. Seeing the format of the output should help you figure out how to format the inputs. 

    You might also find a conversion exit helpful, but it will degrade performance. You can find this option in the workspace tab:

    Thanks,



    ------------------------------
    Maria Ebner
    Precisely Software Inc.
    ------------------------------