on 06-01-2011 8:40 AM
HI Friends,
I have a req in which i need to create BP from a flat file. in this I need to assign them Job Group ( BUT000-JOBGR).
do you know which FM to use for assigning this attribute since BAPI_BUPA_CREATE_FROM_DATA doesnt have this field.
Thanks in advance.
-
Dave
Solved.
Just need to pass the LS_BP_DATA_X Parameter.
-
Dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This field is available in function 'BAPI_BUPA_CREATE_FROM_DATA' under EXPORTING parameter CENTRALDATAPERSON. You must fill it in OCCUPATION field.
I have also one question for you. Were you able to maintain international address with one of the functons. I'm able to fill standard address but I didn't find fm for maintaining internation addresses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have written a very simple piece of code for this:
Data: bp_number type but000-partner value '101', " Test BP Number
occupation type BU_JOBGR VALUE 'VP', " This is the value from the table TB028
LS_BP_CENTRAL TYPE BAPIBUS1006_CENTRAL,
LT_RETURN TYPE TABLE OF BAPIRET2,
ls_return type bapiret2,
Ls_BP_DATA TYPE BAPIBUS1006_CENTRAL_PERSON.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = bp_number
IMPORTING
OUTPUT = bp_number .
CALL FUNCTION 'BAPI_BUPA_EXISTENCE_CHECK'
EXPORTING
BUSINESSPARTNER = bp_number
TABLES
RETURN = LT_RETURN
.
CALL FUNCTION 'BAPI_BUPA_CENTRAL_GETDETAIL'
EXPORTING
BUSINESSPARTNER = bp_number
IMPORTING
CENTRALDATA = LS_BP_CENTRAL
CENTRALDATAPERSON = LS_BP_DATA
TABLES
RETURN = LT_RETURN .
ls_bp_data-OCCUPATION = occupation.
CALL FUNCTION 'BAPI_BUPA_CENTRAL_CHANGE'
EXPORTING
BUSINESSPARTNER = bp_number
CENTRALDATA = LS_BP_CENTRAL
CENTRALDATAPERSON = LS_BP_DATA
TABLES
RETURN = LT_RETURN
.
LOOP AT lt_return TRANSPORTING NO FIELDS WHERE TYPE = 'E'
OR TYPE = 'A' .
EXIT.
ENDLOOP.
IF NOT sy-subrc eq 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = Ls_RETURN
.
ENDIF.
In this whole code i am not getting any error in the Lt_return OR ls_return, but the value is not getting updated.
I checked that BAPI_TRANSACTION_COMMIT is getting executed just to be sure.
-
Dave
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.