05-26-2011 12:45 PM
Dear Experts,
In PFCG transation for Role pushing when I press generate button manually it does all processing successfully in background but if I do it using BDC recording it just come out without processing anything with success message. Please help.
wait for the reply.
Thanks in advance.
05-30-2011 2:07 AM
Hi,
do you want just generate multiple roles? If yes then there is a tool for mass generation in PCFG -> Utilities -> Mass Generation and you don't have to run BDC. PFCG is not suitable for BDC because it uses external component to display long text for role.
Cheers
05-30-2011 6:15 AM
Hi,
Why dont you Execute the BDC in foreground and see what is the problem.
05-30-2011 10:10 AM
just post the code here so that any one can help you << personal information removed.>>
Edited by: Rob Burbank on May 30, 2011 11:18 AM
05-30-2011 4:09 PM
HI,
Try to use code below instead of using BDC.
Enqueue
CALL FUNCTION 'PRGN_ACTIVITY_GROUP_ENQUEUE'
EXPORTING
activity_group = i_agr_name
EXCEPTIONS
foreign_lock = 1
transport_check_problem = 2
OTHERS = 3.
IF sy-subrc NE 0.
exit.
ENDIF.
CALL FUNCTION 'PRGN_RFC_CREATE_ACTIVITY_GROUP'
EXPORTING
ACTIVITY_GROUP = i_agr_name
ACTIVITY_GROUP_TEXT = i_agr_text
COMMENT_TEXT_LINE_1 = ' '
COMMENT_TEXT_LINE_2 = ' '
COMMENT_TEXT_LINE_3 = ' '
COMMENT_TEXT_LINE_4 = ' '
PROFILE_NAME = i_profile
PROFILE_TEXT = ' '
ORG_LEVELS_WITH_STAR = ''
NO_DIALOG = 'X'
UNMAINTAINED_FIELDS_WITH_STAR = ''
TEMPLATE = ''
ONLY_TCODE_ASSIGNMENT = ' '
TABLES
TCODES =
HIERARCHY_NODES =
HIERARCHY_TEXTS =
EXCEPTIONS
ACTIVITY_GROUP_ALREADY_EXISTS = 1
ACTIVITY_GROUP_ENQUEUED = 2
NAMESPACE_PROBLEM = 3
ILLEGAL_CHARACTERS = 4
ERROR_WHEN_CREATING_ACTGROUP = 5
PROFILE_NAME_EXISTS = 6
PROFILE_NOT_IN_NAMESPACE = 7
NO_AUTH_DATA_SELECTED = 8
ILLEGAL_TCODES = 9
NOT_AUTHORIZED = 10
PROFGEN_TABLES_NOT_UPDATED = 11
ERROR_WHEN_GENERATING_PROFILE = 12
OTHERS = 13
.
IF SY-SUBRC <> 0.
exit.
ENDIF.
ls_auth_data-object = 'S_RS_AUTH'.
ls_auth_data-field = 'BIAUTH'.
ls_auth_data-low = i_bi_auth.
ls_auth_data-modifier = 'U'.
append ls_auth_data to lt_auth_data.
CALL FUNCTION 'SUPRN_DARK_MANIPULATE_PROFILE'
EXPORTING
ACTIVITY_GROUP = i_agr_name
PROFILE_NAME = i_profile
USE_EXTERNAL_TEMPLATE_DATA = 'X'
AUTH_TEMPLATE_TO_ADD = ' '
FILL_ORGS_WITH_STAR = ' '
FILL_FIELDS_WITH_STAR = 'X'
NO_DIALOG = 'X'
REBUILD_AUTH_DATA = 'X'
GENERATE_PROFILE = 'X'
IMPORTING
PROFILE_TORSO =
TABLES
TCODES =
EXTERNAL_TEMPLATE_DATA = lt_auth_data
EXCEPTIONS
PROFILE_NOT_IN_NAMESPACE = 1
PROFILE_NAME_EXISTS = 2
NO_AUTH_FOR_ROLE_CHANGE = 3
NO_AUTH_FOR_PROF_CREATION = 4
NO_AUTH_FOR_AUTH_MAINT = 5
NO_AUTH_FOR_GEN = 6
NO_AUTHS = 7
OPEN_AUTHS = 8
TOO_MANY_AUTHS = 9
ERROR_WHEN_GENERATING_PROFILE = 10
OTHERS = 11
.
IF SY-SUBRC <> 0.
exit.
ENDIF.
Dequeue
CALL FUNCTION 'PRGN_ACTIVITY_GROUP_DEQUEUE'
EXPORTING
activity_group = i_agr_name.
e_ok = 'X'.
This will create role. To save authorisation use FM "RSEC_MODIFY_AUTH".
Srikanth.
06-03-2011 4:43 PM
Hi Tanisha,
Did you check the checkbox Simulate in Background Mode while recording the BDC in SHDB Transaction.
The usage of the check boxes while creating a recording.
X Default Size = Sap has standard screen size which needs to be maintained for all the screen resolutions for any type of sytem for that purpose this check box is by default checked.
XCont.After Commit = This is for the Processing Mode to continue after the commit of data.
XNo Batch Input = This for getting new screens from the transaction while recording rather than old screens.
Example try to records XD01 with this checkboc Checked once and Unchecked once, you vl come to know the difference.
XSimulate in Background = this checkbox is to simulate the transactions recorded with same screens even in background.
Thanks & regards,
Bhargav.