Unable to get key field value in Method

Dear All,
I am Trying to implement Notification workflow on BOM Change.
I am doing it via BADI : BOM_UPDATE
*        " Declare Variable for Object Key
  DATA :   l_objkey     TYPE sweinstcou-objkey,
           wa_stzu      TYPE stzu.
  LOOP AT delta_stzub INTO wa_stzu.
  ENDLOOP.
*        " Pass Object Key Variable to Business Object
  CONCATENATE wa_stzu-stlty wa_stzu-stlnr INTO l_objkey.
*        " Function to call Business Event
  CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
      objtype    = 'ZBO_BOM_NF'
      objkey     = l_objkey
      event      = 'TR_BOMNF'
      debug_flag = 'X'.
  IF sy-subrc = 0.
    WRITE : /5 'Event is triggered wf started'.
  ELSE.
    WRITE : /5 'No Event is triggered Check WF'.
  ENDIF.
When i use this value in my method no value is passed
select single * from mast where stlnr = object-key-stlnr.
variable object-key-stlnr doesn't bring required val.
Thanks all,
Regards,
Gaurav Sood
Can you please tell what went wromg here

Hi Gautam,
How r u,
Requirement :
I want to initiate a WF on BOM Change.
Steps
1.    called FM in BADI to trigger WF when BOM is changed.    ( Working Fine ).
2.   WF is initiated and reciever has it his SAP inbox                 ( Working Fine ).
3.    User should be able to Display BOM from WF using CS03
       as per Code
select single * from mast where stlnr = object-key-stlnr
          SET PARAMETER ID 'MAT' FIELD mast-matnr.
          SET PARAMETER ID 'WRK' FIELD mast-werks.
          SET PARAMETER ID 'CSV' FIELD mast-stlan.
          CALL TRANSACTION 'CS03' AND SKIP FIRST SCREEN.
The Problem here is that value object-key-stlnr is blank here.
Rgds,
Gaurav Sood
1     100000003     ZBO_BOM_NF

Similar Messages

  • How to get a field value in the report

    hi all :-
    i need to get the field value in the formate trigger inside a specified field in the report?

    please post your request in the report category forum

  • Unable to get the selection value of OAMessageChoiceBean

    Hi,
    From our 11i to R12 upgrade, in Customer Advance Search page, we are unable to get the proper handle for OAMessageChoiceBean (in extendedCO).
    The code snippet for handling the bean is as follows:
    OAMessageChoiceBean PartyStatusFilter = (OAMessageChoiceBean)vOAPageContext.getRootWebBean().findChildRecursive("xxfeF426PartySearchStatus");
    String xxTest= PartyStatusFilter.getSelectionValue(vOAPageContext);
    The value for above xxTest (in R12 env.) is coming as null. Whereas, the same code is working in 11i enviroment and the output of xxTest="A".
    Hence, we are unable to get the selection value of the messagechoicebean in our R12 environment. Moreover, I've already looked into similar previous posts of this forum, also tried using getSelectionText(vOAPageContext) or getSelectedValue(), but it didn’t worked too.
    Any pointers please?
    Many Thanks,
    Zahid

    Hi Keerthi,
    I'm still unable to get the value using your provided code. The referenced snippet I used is as follows:
    String messageChoiceValue = null;
    vOAPageContext.writeDiagnostics(s, "Before the IF LOOP", 2);
    if(vOAPageContext.getParameter("xxfeF426PartySearchStatus")!= null ) {
    vOAPageContext.writeDiagnostics(s, "Inside the IF LOOP ", 2);
    messageChoiceValue = vOAPageContext.getParameter("MessageChoiceID");
    vOAPageContext.writeDiagnostics(s, "Value of MessageChoice... "+messageChoiceValue, 2);
    if( messageChoiceValue != null ) {
    l++;
    saveFilterRow(SSLineVO, HeaderId, new oracle.jbo.domain.Number(l), "C", "Status", messageChoiceValue);
    vOAPageContext.writeDiagnostics(s, "After the IF LOOP", 2);
    The resultant output is as follows:
    "Before the IF LOOP", "After the IF LOOP"
    It doesn't goes inside the IF condition as the valuie is null. Any other alternative?
    Regards,
    Zahid

  • Key Field Value for File Adapter Sender Wildcard

    Hello everybody, is there a way to use a wildcard for the property of NamA.keyFieldValue in the cc for a Fils Sender????, here's an example why, I need to take some Files via PI 7.0 and my key filed can change according to the file an example is that in a file can be HF28 and in another file can be HF29, the only character that is going to be constant is the H, I would really appreciate any suggestions, thanks in advance.
    Regards,
    Julio Cesar

    Hi Julio
    File sender adapter will read the file using FCC
    Key Field Value entry is mandatory if the key field name is set. Otherwise, the entry can be ignored
    http://help.sap.com/saphelp_nw70/helpdata/EN/34/393071e9b998438ddb8ce97cd617a1/frameset.htm
    Content Conversion ( The Key Field Problem )
    Thanks
    Gaurav Bhargava

  • Wild Card as key field value in Content Conversion

    Hi,
         Can any one please tell me that can a wild card such as '*' be used as key field value.
    Thnx,
    Pravesh Puria.

    Hi Pravesh
    For the file name in the sender file adapter you can use the '*' or '?'(as a placeholder for exactly one character)
    You can also enable the "Advanced Selection for Source File" in the sender file adapter, where you can do two things:
    a)you can specify an exclusion mask for the file name specified above.
    b)you can specify/lits multiple directories with a file name and an associated exclusion mask, e.g. in file name you put ".txt" and in the associated exclusion mask "a". The every file with ".txt" except "a" will be fetched from that directory. 
    Try it out.
    Regards,
    Goekhan

  • Key Field Value in FCC

    Hi Experts,
    I have a scenario in PI, where I have 1 Header, n Data Records and 1 Trailer in the source file. This data is coming in CSV format.
    I am using FCC to convert CSV into XML.
    In the FCC, I have used keyFieldValue parameter. For the Header Record, the Key Field Value is constant "H"; for Trailer Record the key field value is constant "T".
    However for Data Record, the key field value is not constant. The first character of Key field of Data Record will always be "D", but rest of the Alphabets can change.
    Sample File:
    "H","3.04",22/10/2009,16:31:12
    "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    "T",1393.27,1393.27,8
    Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    I have no clue, if this can be converted into XML through FCC.
    Any help will be highly appreciated.
    Regards,
    Varun

    >
    Varun Agarwal wrote:
    > Sample File:
    >
    "H","3.04",22/10/2009,16:31:12
    > "D2S",21/10/2009,20:00:26,"20044",00666,"S",1
    > "D2S",22/10/2009,14:26:20,"20044",00668,"S",1
    > "D0S",22/10/2009,08:33:34,"00044",04165,"S",1
    > "D0S",22/10/2009,11:59:59,"00044",04166,"S",1
    > "T",1393.27,1393.27,8
    >
    > Here, first line is Header Line (Key Field Value "H"), Last Line is Trailer Line (Key Field Value "T") and all lines in between Header and Trailer are Data Records (Key Field Value starts with "D). I need to convert this file into XML.
    >
    > I have no clue, if this can be converted into XML through FCC.
    > Any help will be highly appreciated.
    >
    >
    > Regards,
    > Varun
    Write a simple module. The module will do a replace of the Dxx fields to D (you can use simple regex function for this)
    After the module, use the messagetransformbean to do the FCC for you.
    The module might sound complex, but trust me its a simple logic you need to implement and you can easily do the FCC with the messagetransformbean

  • How can we hide the non key field values in the sm30 display

    hello experts,
    I have to protect the non key field values in the sm30 display , can u help me out wat changes i have to do in the layout.

    Hello Gopal,
    What do you mean by 'protecting' your non-key field value?
    1) You want to display it, but make it non-changeable
    A - Make the field as output-only in screen, as already answered by a preivous collegue
    2) You do not want to display this field at all
    A - Goto the DDIC definition of the view (not possible for a table directly), and maintain the required field as a Hidden. After activating, remember to re-generate the maintenance dialogue. Also, please maintain Event 21, in case you want to access/change the value of this field in background.
    3) You want to maintain special validations/checks for the field
    This can be easily done by introducing your modules within the CHAIN-FIELD commands in the PAI of the generated screens.
    Best Regards,
    Rekha

  • File Content Conversion - Key Field Value

    Hi Experts,
    I am using File to Idoc scenario for my mapping. In the receiver Communication channel, I am using File Content Conversion. My scenario is as follows :
    I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'. I need to throw an exception when this Key Field is not 'H' or 'L'.
    In the 'Content Conversion' tab, my attributes are as:
    Header_Structure.keyFieldValue = 'H' and Line_Structure.keyFieldValue = 'L'. Is there any more attributes that I need to add ?
    Please advise. Thanks a lot.
    Regards,
    Freddy.

    >>multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L
    AFAIK it is not possible but lets wait for other experts to comment on this...
    >>Can keyFieldInStructure (add, ignore) parameter help me in this case ?
    No. this parameter is only used when you want to include key filed in ur XML structure(add) or not (ignore)...
    Chk this:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

  • How to convert flat file to XMl without key field value

    Hi experts,
    I have a input CSV Flat file which has got one HEADER line and Multiple Detail records.
    I do not have any key field value to convert this FLAT file to XML using normal file content conversion.
    Is there any module or Bean which can be used to convert this Flat File to XML.
    Or any other remedy to overcome this problrm.
    Thanks in advance.
    Regards
    Pradeep

    Hi Saurabh,
    Thanks for the reply.
    Ur understanding is perfectly alright.Lets say my file is like below.
    Account Number,Account Name,Currency,Unclear Balance,Account Balance010205000033,VAISHNAVI SALES CORPN,0.00,0.00,350000.00
    010205000034,CHAKKA ENTERPRISES,0.00,-641350.47,8649.53
    010205000035,SEHGAL TRADING COMPANY,338665.00,-220.00,461115.00
    010205000036,SHUBH LAXMI AGENCIES,0.00,0.00,0.00
    010205000037,EMPIRE AGENCIES,0.00,-245.11,0.00
    010205000038,PIONEER AGENCIES,0.00,-696386.00,303614.00
    I am not using the first line in the mappiing.
    Are you saying that I need to ignore the first line while doing the conversion using Recordset OFFSET ?
    Or do I need to make a single structure taking all the fields from header as well as details and while defining the structure I need to ignore the fields from header?
    Please suggest.

  • Content Conversion without key field value

    Hi all,
    I want to do a content conversion which includes a record structure Header,1,Detail,*
    I dont have any key field value in the header nor in the detail. Can this be achived using FCC or should i go for Java.
    Rgds
    Aditya

    Hi Aditya,
    I think if u having multiple records then one shud hav key fields,
    pls check 4th point in this guide
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/troubleshooting%2bthe%2bfile%2badapter
    Also check this discussion::File Content Conversion(SenderFileadapter) fields parameters
    Thanks,

  • How to get item field values for old versions?

    I need to be able to query old field values from previous versions of items in a SharePoint list. I can't execute code on the server (it needs to work with SharePoint Online/O365 for a start).
    So far the ONLY API I've that lets me do this is the lists.asmx GetVersionCollection SOAP call.
    This lets me specify a single field name and returns an XML structure with the values for the various versions, along with the modification time and who made the change - but NO reliable way of actually identifying *which* version (i.e. an ID or label). That
    is, if I know I need to fetch the Title value from version 512 ("1.0") of item 1 in list "Documents", I don't see how to reliably parse the results to determine which entry is version 512. While they may be returned in order, in many cases
    the entries are actually missing when there was no field value present (or perhaps when the field hadn't been created yet). I've tried comparing the Modified date to the Created date of the corresponding FileVersion item (which I can get via CSOM or REST),
    and while it works some of the time, it's not reliable. I've also looked at the output from the lists.asmx GetVersion API but I don't see how that's useful either, as the Created property for all versions always seems to be just the date the file was originally
    created.
    It does seem odd to me that there's not a neat way of doing this - if I need to return information for several fields but just for a single version, I have to make a whole lot of requests that return far more info than I need, and then I need to figure out
    how to parse the returned text in the case of, say, multiple-value taxonomy fields etc.
    Anyone tried doing anything similar here?
    Thanks
    Dylan

    try these links:
    https://support.office.microsoft.com/en-us/article/Track-and-view-version-information-for-SharePoint-list-items-2d69d936-fb0b-4c84-830e-11708e6ec317?CorrelationId=f87cf6ea-8cbf-446a-a4a0-e2c3a86b3425&ui=en-US&rs=en-US&ad=US
    https://social.technet.microsoft.com/Forums/en-US/e48ff216-7ed1-4b20-9f21-d496b1583eea/how-to-get-item-field-values-for-old-versions?forum=sharepointdevelopment
    http://sharepoint.stackexchange.com/questions/20019/get-meta-data-from-a-previous-version-of-a-document-through-webservice-in-moss-2
    http://sharepoint.stackexchange.com/questions/121594/getting-information-from-previous-versions-of-a-sp-list-using-csom
    Please mark answer as correct if it is correct else vote for it if you find it useful Happy SharePointing

  • Can we change key field values in table maintenance

    Hi,
      I have created Z-table and table maintenance for the same...
    In table maintenance..Can we change key field values??
    Is there any posibility????
    Rayudu

    you can do it in this way.
    open sm30->tablname->edit
    snow select the row(s)->copy->change the keyfield values-back->save.
    no in that sm30, select records with old primary key and delete->save.
    so you got all field similar for those record under modification, only the key field changed.

  • Setting primary key field value in jdoPrestore() not flushed to database ?BUG?

    Hello,
    When I set value of primary key field of a new instance in jdoPrestore() new
    value does not get flushed to database - old (default) value get stored
    instead. All other fields assigned in jdoPrestore() get successfully
    flushed except primary key one.
    Alex

    Abe,
    You fixed only part of the problem. Right now if I assign value to a PK
    field in jdoPreStore() it does get flushed but there is another issue - all
    other instances which referenced the one I assigned PK to will not get this
    PK value. Example A references B, in B.jdoPreStore() I generate id for B -
    b.id = 100. When A gets flushed it would not get 100 in its b_id field.
    Specs says:
    This method is called ***before the values are stored from the instance to
    the StateManager***.
    Data store fields that might have been affected by modified non-persistent
    fields should
    be updated in this method. This method is modified by the enhancer so that
    changes to
    persistent fields will be reflected in the data store.
    The context in which this call is made allows access to the
    PersistenceManager and
    other persistent JDO instances.
    I read it as callbacks should be invoked on ALL instances before they get
    stored to StateManager. Does Kodo invoke callbacks for all istances first
    and then store them to instance manager? Based on the problem I am having it
    does not look like it
    Alex
    "Abe White" <[email protected]> wrote in message
    news:[email protected]..
    I just confirmed this as a bug and fixed it. We should be able to post
    the new jars for you soon. Hang in there.

  • How to get Input field value?

    Hi All,
    I have some problem in getting of input value from View to customcontroller.
    My problem is I have created a Input field in the view and if Iam giving the value to that field I can capture the value from View to customcontroller and send it as BAPI input.But My input filed is in the view Context.
    How can i capture InputFiled value from View to CustomController.
    Advance thanks
    Nageswara.
    Message was edited by: nageswar mandapati

    Thanks for your response Patrick,
    In my customcontrollerView all my BAPI mathods instances and execute methods are declared.All the attributes directly getting from model class.
    But I have two views , in first view I created a input field(for that i created valueAttribute in that context).
    Here I want give the conditions If  the input field is empty then directly call the execute method of BAPI.
    Otherwise give any input to the inputfiled then capture that value and send it input to BAPI from view to BAPI.
    In my customcontroller
    BAPI b = new BAPI();
    b.Param1();
    b.param2();
    and
    execute BAPI()
    I done like this.
    How can i capture the view input value how to send as a b.parama();
    Please guide me .
    Any snippests appriciate.
    Thanks
    nageswara.

  • Modify Key Field Values of a table through Table Maintenance Generator

    Hi All,
       I have created a z table with below structure. In this fields upto Valid To are all key fields. This is to ensure that consistant valid record get stored in the table.
    MANDT     MANDT     CLNT     3     0     Client
    VKORG     VKORG     CHAR     4     0     Sales Organization
    VTWEG     VTWEG     CHAR     2     0     Distribution Channel
    SPART     SPART     CHAR     2     0     Division
    SKU     MATNR     CHAR     18     0     Material Number
    LZONE     LZONE     CHAR     10     0     Transportation zone to or from which the goods are delivered
    VALID_FROM     ZVALID_FROM     DATS     8     0     Valid From
    VALID_TO     ZVALID_TO     DATS     8     0     Valid To
    PLANT     WERKS_D     CHAR     4     0     Plant
    SNP_TZONE     ZSNP_TZONE     CHAR     20     0     APO Transportation Zone
    ERDAT     ERDAT     DATS     8     0     Date on Which Record Was Created
    ERNAM     ERNAM     CHAR     12     0     Name of Person who Created the Object
    AEDAT     AEDAT     DATS     8     0     Changed On
    AENAME     AENAME     CHAR     12     0     Last changed by
    I have created a Table Maintance program through the Table Maintenance Generator. And for that I have assigned a t code.
    I can able to create new entires but i can not able to modify Valid_from and Valid_to entries of existing records.
    Initially those two fields were in display mode but i went to its module pool program and made then as input enabled. But what the vales I was entering, its not getting saved in database. When we change the values of those fields and save it, the system is saying No Data Change.
    Any inputs how to solve this issue. I can not make VALID_FROM and VALID_TO fields as non key.
    Regards,

    Hi,
      As you have already said that the value for valid to is a part of the key so you should not have any issues when this value is changed and the value is saved using the table maintainence generator, but in case you want to save values where the value for valid from has changed but the key is same we would not be able to save as there is already a value for the key, so if you want to save these values there are two ways 1 would either to delete the existing value value and create the new value or to have one more field as the key field like a counter so when the value is saved with a key the value is saved with counter as 1 and then ever next time for the new values increase the value of the counter.
    In order to save these values use event 5 and put you code there.
    You can also carry out checks for new aithorization in that event also.
    Regards,
    Himanshu

Maybe you are looking for