2012 Jun 12 2:30 PM
When i try to get information via ctrl+f8 it says help not avail in English. I have tried to find more information on this function through web searching, but have not been able to find anything reasonable.
What i am trying to do is validate on a field on partner creation in the t-code BP.
I have it validation on change, using
CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
EXPORTING
businesspartner = gt_but000-PARTNER
* ADDRESSGUID =
* valid_date = gv_valid_date "SY-DATLO
IMPORTING
addressdata = l_address.
** TABLES
** bapiadtel = lt_tel
** bapiadfax = lt_fax.
but address data is blank on creation when i call this in BUP_BUPA_EVENT_DSAVC.
i read that i could use BUS_PARAMETERS_ISSTA_GET, but am not sure exactly what parameters are doing / returning what...
Any help would be greatly appreciated.
2012 Jun 12 5:14 PM
Look at how your DSAVE event is written...why would you not do the same thing in your DSAVC? For my BDTs, I'd be doing this in a DCHCK event, so that I could fire an error and navigate back to screen.
My BCA_BUPA_EVENT_DSAVE module uses the FM below to get the BUPA information from memory, which is where you should be getting, I would guess, after a change transaction is called:
call function 'BUP_BUPA_MEMORY_GET_ALL'
tables
.... whichever ones that you need....see the long tables list.
You can find a lot of stuff by looking at the BDT Events, and the (usually lengthy) list of function modules that are called within each event.
2012 Jun 12 5:14 PM
Look at how your DSAVE event is written...why would you not do the same thing in your DSAVC? For my BDTs, I'd be doing this in a DCHCK event, so that I could fire an error and navigate back to screen.
My BCA_BUPA_EVENT_DSAVE module uses the FM below to get the BUPA information from memory, which is where you should be getting, I would guess, after a change transaction is called:
call function 'BUP_BUPA_MEMORY_GET_ALL'
tables
.... whichever ones that you need....see the long tables list.
You can find a lot of stuff by looking at the BDT Events, and the (usually lengthy) list of function modules that are called within each event.
2012 Jun 12 5:47 PM
Maybe im too tired and just cant find it, but I do not see the address information being returned by that function.
It has ADDRCOMM in BUS000____I, but thats all i can find.
I did come across a similar function BUA_BUPA_MEMORY_ADDRESS_GET, I'll post here if that works.
2012 Jun 12 6:06 PM
Great...the point is, of course, that you want what is in memory, since the db has not yet been updated with any of the user's current changes.... In my BDT work, I use a lot of the 'memory' modules....if you have not already, search in SE37 with '*BUPA*MEMORY*' and look at how many possibilities come back. For me, it comes down to figuring out what each one does and using the one that returns what I'm trying to work on at the moment. My usual observation is that, just like us, SAP writes a lot of different modules that are very similar....sometimes only subtle changes from one to the next.
2012 Jun 12 8:35 PM
ok, to get it to work correctly you can not do it in _DSAVC, you need to do it in BUP_BUPA_EVENT_DCHCK.
CALL FUNCTION 'BUA_BUPA_MEMORY_ADDRESS_GET'
EXPORTING
i_partner = gt_but000-PARTNER
I_XWA = 'X'
IMPORTING
E_ADDRVAL = lv_ADDR1_VAL
EXCEPTIONS
NO_ADDRESS_FOUND = 1
PARTNER_NOT_FOUND = 2
DATE_INVALID = 3
OTHERS = 4
Note that in BUP_BUPA_EVENT_DCHK that there is the global table gt_but000 that is populated from the fields on the screen. gt_but000-PARTNER will be equal to "##1" but it works fine as that's the partner number in memory for the addresses also.
There is probably an easy way to do it w/o directly accessing global memory that way, but its working.