Read the Current BP number before saving

HI Experts,
From the Identification tab iam creating the BP by entering all the mandatory fields and then i click on END button instead of "Save" so on this END button event i want to read the current BP which is not yet saved in the database.
Iam writting the logic of END button in the IF_CRM_IC_PREPARE_FOR_CALLBACK~EXECUTE method of the Main View set(IUICMD/MainVS).
data: zv_core    TYPE REF TO cl_crm_bol_core,
         zv_entity TYPE REF TO cl_crm_bol_entity_manager,
         zv_core = cl_crm_bol_core=>get_instance( ).
         CALL METHOD zv_core->get_entity_manager
           RECEIVING
               rv_result = zv_entity.
In Debug mode when i check the ZV_ENTITY in that there is one Private Attribute ENTITY_TAB of type Sorted Table where i can see 3 entries with OBJECT_NAME as "BuilHeader","BuilContactPerson", "BuilStandardAddress" when i check the Entity reference of ""BuilHeader" iam getting the current BP number. But how to read this entity iam not getting this.???
I tried the below way..
LOOP AT zv_entity->entity_tab ASSIGNING <itab>.
ENDLOOP.
But it says that "Access to private attribute "ENTITY_TAB" is not allowed."..
Regards.

Hi Hemant,
As you are implementing your method in overview set , try to access the view controller where the BP ID is created by rereading the entity.
DATA: lv_viewname TYPE string,
        lr_viewctrl TYPE REF TO cl_bsp_wd_view_controller.
  lv_viewname = me->get_viewarea_content( '<View Area of your view>' ).                            
  IF lv_viewname IS NOT INITIAL.
    lr_viewctrl = me->get_subcontroller_by_viewname( lv_viewname ).
    IF lr_viewctrl IS BOUND.
      TRY.
          CALL METHOD lr_viewctrl->('<method_name>')   .
           CATCH cx_sy_dyn_call_error.
          RETURN.
      ENDTRY.
    ENDIF.
  ENDIF.
Regards,
Nithish
Edited by: nithish P on Feb 7, 2012 2:32 PM

Similar Messages

  • SapScript, How do I read the current line number?

    I have sections of text - each in it's own element with an 'include' of the standard text.
    These sections are variable in size.
    All elements are in the MAIN window.
    I do not want a paragraph to split over two pages.
    How do I read the current line number within the sapscript before the section prints so I can issue a new-page command at the beginning of the paragraph?
    Thanks!

    Yes, that does work for paragraphs.
    If I have multiple elements to print from within a loop where "at first, at each and at last" each call the Sapscript funtcion write_form - how can I keep the whole section together.  protect/endprotect will keep each element together but not the group of elements.
    There must be a way to find the current line number.

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • System assigning Contact Number before saving the contact

    Hi ,
    In CRM Dev client and CRM QA system is assigning Number for the
    contact (Business Partner) before saving the contact in webui.
    Because of this, system is updating the Contact created time in BUT000
    as the Number assignement time and not the actual contact saved
    time.
    (Whereas in CRM PROD client its not behaving as indicated above and
    its assigning Number after saving and its fine).
    Pl suggest the possibilities to avoid early number assignment and surprised its happening in only Dev and QA.
    Regards
    Babu

    Hi,
    Please take a look at this thread.
    CRM 7.0 Stop Early Number Assignment for  BP create
    Regards,
    Parul

  • Pdf reader that will let me print the current page number to stdout ?

    I'm looking into annotating my readings, and it'd really speed things up if I were able to get the current page number printed to stdout.
    I've been through evince and xpdf's manuals, the latter will let you output the file to ps, so there might be some hacking possible there, but maybe there is a more convenient alternative...?
    Would appreciate some suggestions.
    Cheers !

    Sure that works, it's just that I'm already wrapping my pdf reader in a ruby script to allows me to make annotations linking back to the original document and page, and I also use the clipboard to quote.
    So instead of being a keybinding away, I end up have to juggle with windows...

  • Get purchase order number before saving

    Hi All,
    I am working on Purchase order Creation.
    I want to know the purchase order number before it was saved.
    I have used NUMBER_GET_NEXT function Module.But it is based on Number range.
    I dont want to get based on Number Range.
    I want to get the Get next number based on the Documnet TYpe.
    Is there any possiablity to get that.If yes please let me know.
    Thanks,
    Swapna.

    Hi,
    data : lv_ebeln type ebeln.
    Select single MAX( EBELN ) from EKKO into LV_EBELN.
    Next PO Number =  LV_EBELN + 1.
    Try this.
    This will work if maintain only one number rage object for PO Number.
    Thanks,
    Durai.V

  • Urgent ---calculate version  from the current week number

    hi,
         i have an requrenment to modify the charasteric routines
      i have xxx table with parameter i have to read this paramater n  if this parameter contains value 'D' then calculate version(eg:- A00,A01 ...) from the current week number.
    pls advice me which FM i have to call or provide me with some sample codeing.
    points wil be rewarded
    ravi

    There is a FM "WEEKNR_GET".
    This will give you the week no. You need to read the param value from the table that you mentioned and call this FM and updat the version.
    You will need a ABAP person to do this.
    Ravi Thothadri

  • How to read the product version number of the installer properties programmatically

    In my application (.exe) I want to read the product version number
    (e.g. 1.0.9), which I entered in the application builder. (Installer
    Settings -> Properties). Is that possible with LabVIEW? The revision
    number of the VI doesn't help me much, because it is increased each
    time I save the VI.
    Thanks for answers
    Dave

    The verison number you entered in the application builder (Installer Settings -> Properties) is the version associated with the installer not the exe.
    One way to keep track of a version associated with a LV exe is to include a subVI in your exe that stores and returns this value. You'd just have to update it yourself before building your exe.
    Deborah

  • What is the current maximum number of participants...

    Hi everyone,
    I could not easily find an answer to this;
    What is the current maximum number of participants in Skype audio and video calls with pro or free accounts?
    Thanks,
    Lars

    AS far as I* can gather (from this site), it's 25 and 9.

  • What is the current version number of Mail ?

    What is the current version number of Mail that is installable on Mac OS X 10.3.9 ?

    There is no Mail.app version available as a standalone download.
    I'm not sure about the Mail.app version number for 10.3.9 but the current version for 10.3.9 should have been included when you installed 10.3.9.
    You cannot use the Tiger Mail.app version Panther.

  • What is the current build number of Win10?

    What is the current build number of Windowb Technical Preview 10?

     Build 9879.
    Build 9879 Enterprise direct download link:
    Windows
    10 Enterprise build 9879 64-bit ISO image
    Windows
    10 Enterprise build 9879 32-bit ISO image
    Build 9879 Non-enterprise download link :
    http://windows.microsoft.com/en-us/windows/preview-iso-update?os=win10
    But, a new build is said to be released next week.
    Editing...... the next new build is slated to be released on this Jan 26th.

  • How to find dynamically the current line number in the source file

    Is there a mechanism like __LINE__ and __FILE__ macro in C to get dynamically
    the current line number and file name of a source file?

    Don't know - but others have asked too. Have you searched the forum? For example:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=210496

  • How to get the current month number

    Hi everyone,
    Does anybody know how to get the current month number in Oracle Discoverer Worksheet calculation?
    I try to use EUL_DATE_TRUNC(CURRENT_DATE, 'MM'), but instead I got 01-AUG-00.
    If I change the data display format to MM, it will give me "08" but if I use TO_NUMBER function to convert it to number I get error "invalid number"
    Is there anyway to get the current month value in number? Thanks

    Scott,
    Thank you so much! It works perfectly! :)
    Hope you have a great day ahead!
    Cheers,
    Angeline

  • What is the current version number?

    Can you tell me what the current version number for
    acrobat.com is? One of my computers (XP Home SP3) shows version #
    1.2.443, but I just intstalled it on another of my computers
    (actually, it automatically installed with acrobat 9 I think) (this
    computer has XP Pro SP3) and the version shows as 1.2.443. I also
    have a third computer with version 1.1.377. So now I am really
    confused...I JUST installed acrobat.com o this computer, yet it has
    an older version than one of my other computers that installed it
    long ago. So here are my questions:
    1. Why would they have different version numbers (especially
    the one that was just installed that has a different version
    number)?
    2. What exactly is the most current version number
    3. How (or where) do I get the most current version?

    Hi Mickey71,
    Thank you for trying out Acrobat.com! We hope you like it!
    What you're seeing is the AIR version number, rather than the
    Acrobat.com version number.
    Mine also shows version 1.2.443
    You ca get the latest Acrobat.com AIR version
    by
    clicking this link
    Acrobat.com on the web, IS the most current version, right
    when you visit Acrobat.com. So there is no need to go "get" the
    latest version
    Since the AIR application accesses the Web Acrobat.com, it
    will include most updates that make it to the Acrobat.com services.
    Hope this helps!
    Pete

  • Reading the current frame of an Event Structure

    Is there a way to read the current frame (or state?) of an Event Structure?
    Richard

    johnsold wrote:
    Normally a program would not stay in an event case for long enough for the phrase "current frame" to have much meaning.  What are you trying to do?
    Lynn
    Like tst assumed, it's for edit time use. Some events take a few seconds, and the progress would be nice to watch on the FP like you'd typically do with a state machine, and with dynamic events (as opposed to just user events), it would be nice to see where the structure is going.
    I have tried something with scripting as shown, but it's not much help. There's no property "Current Frame" or similar. Visible Frame (as shown) doesn't do it.
    Richard

Maybe you are looking for

  • I cant watch netflix on ipad, it wont let me download update because ipad doesnt have ios 4

    When i click on the netflix app, it says to update to the latest version of the app. So when i try to download the update to the app, it tells me i cant download the app because my original ipad does not have ios 4.  So now i cant watch netflix on my

  • I am experiencing some problems with my Nokia 701

    I am  experiencing some problems with my Nokia 701. 1)While updating OS with Nokia suit  its restart then phone becoming dead and need to remove battery and insert it again in order to work and i need to run without completing full update 2)I am gett

  • How to get the Dataprovider var of a Datagrid inside an ItemRenderer?

    Hey, I have two Datagrids, both of them have a bindable dataprovider. My first Datagrid has an ItemRenderer. I would like to update my dataprovider inside the ItemRenderer. Is it possible? My ItemRenderer is a Combobox. Everytime I change the Combobo

  • IPhoto is deleting my pictures after I upload and edit them

    I uploaded a bunch of pictures to iPhoto and the program has continuously been deleting my photos or it has been saying that the files do not exist even though the pictures show up in the program as thumbnails.  Is there a reason the program deletes

  • Reading sections of files

    i have made a file that holds various information in it that is structured something like this: label block label block What i am wanting to do is read a random block from the file. These blocks consist of just numbers. So far i am using Random to ou