How to find Job relationship using the Function Module RH_STRUC_GET
Hi Experts,
I am getting O-S-P relation ship using for an org unit using the function module RH_STRUC_GET.
Further If I want the job relation ship, how it can be found out.
Thanks in Advance,
Irfan
Hello Irfan,
Have a look at the table T778A for evaluation path you require and pass this to the function module.
Regards,
Manoj.
Similar Messages
-
How to find out what are the functions supported by string class
Hi,
Can any one let me know how to find what are all the functions supported by the string class in standard(STL) library on solaris.
Regards,
Vignesh1. Any C++ textbook that covers the Standard Library will tell you about the standard string class. A good tutorial and reference for the entire Standard Library is "The C++ Standard Library" by Nicolai Josuttis, published by Addison Wesley.
2. WIth Sun C++, the command
man -s3C++ basic_string
provides documentation for the default libCstd version of the Standard Library.
3. You could look at the <string> header itself. I don't recommend that approach. -
How to use the function module 'HR_ES_FEATURE_BACKFIELD'
Hi,
How to use the function module 'HR_ES_FEATURE_BACKFIELD'?
I need the usage from both technical as well as functional point of view.
What is the use of this function module and technically how it is to be used to retrieve a feature for a particular employee.hey iam from functional side can u be little bit clear of that feature
thanks
sikindar -
How to use the Function Module RH_READ_INFTY_1001...
Hi,
Can any one Tell me .. How to do the same functionality .. given below (select).
Using the Function Module RH_READ_INFTY_1001...
*reads CP (Central Person) based on BP (Business Partner)
Select single objid (Object ID)
from hrp1001
into gv_sobid
where subty eq 'B207'
and sclas eq 'BP'
and sobid eq is_header-partner.
*reads P (Person) Based on determined BP (Business Partner)
select single sobid (ID related Object)
from hrp1001
into gv_sobid
where subty eq 'B209'
and otype eq 'CP'
and objid eq gv_sobid.
*determines UserID from IT0105 for determined personell ID
select single usrid
from pa0105
into gv_usrid
where pernr eq gv_sobid
and subty eq '999'.
Reply ASAP....
Answers will be Rewarded...objects-plvar = l_plvar.
objects-otype = 'S '.
objects-sobid = l_positions-objid.
APPEND objects.
CLEAR i1001_itab. REFRESH i1001_itab.
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
* AUTHORITY = 'DISP'
* WITH_STRU_AUTH = 'X'
istat = '1'
* EXTEND = 'X'
subty = 'A008'
begda = l_keyda
endda = l_keyda
* CONDITION = '00000'
* SORT = 'X'
* WITH_EV = ' '
* ADATA = 'X'
TABLES
i1001 = i1001_itab
objects = objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
IF sy-subrc <> 0.
CLEAR i1001_itab. REFRESH i1001_itab.
CLEAR mngr_nr.
ELSE.
READ TABLE i1001_itab WITH KEY sclas = 'P'.
IF sy-subrc = 0.
mngr_nr = i1001_itab-sobid.
ELSE.
THis is the sample code to use function module using this function module you can get upto HRP1001 selection for userid you need to use same select you write for PA0105 -
How to use the function module CONVERSION_FACTOR_GET?
Hi Experts,
I have to use convert the value of a field from units 'HL' to 'HHL'. According to me, we can use the function module CONVERSION_FACTOR_GET. However, i am not able to know how to use it?
Can anyone explain how to use the FM, i mean what should be the importing and exporting parameter.... For recap, i need to convert HL to HHL, for example 3 HL to 0.03 HHL.
Please help.
Rewards for sure!
Thanks in advance.
AkshHi
If it is Unit Conversion better use the following Fun modules
UNIT_CONVERSION_SIMPLE
MD_CONVERT_MATERIAL_UNIT
goto SE37 first and execute them by entering some value and then use it in the code after confirming it
Regards
Anji -
How to use the function module ....
hi
how to use the function module ssf_function_module_name in smartformsHi..
If you are using this Function module, you can get the generated function module name of smartform dynamically. It is good progrmaming practice to get the fucntion module name dynamically because there might be some problems if you are hard coding in program.
This will return the name of the function module and then from the exporting parameters you can use the fucntion module name to pass parameters to Smartforms.
Check this link.I am expalining here how to use this function module.
https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=36109&version=2
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
<b>Reward points if useful</b>
Regards
Ashu -
Regarding how to use the function module *control_form* in scripts
HI friends,
Can any one tell why and where do we use the function module control_form in scripts. Can you give me a small scenario how to use in scripts.hi satish,
by using this function module we can pass the control
commands to FORM THROUGH ABAP/4 PROGRAM.
see the following example:
TABLES: kna1.
DATA: BEGIN OF it_kna1 OCCURS 0,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
land1 LIKE kna1-land1,
END OF it_kna1.
DATA:records TYPE i,
window TYPE i value 1.
select-options:s_kunnr for kna1-kunnr.
SELECT kunnr name1 ort01 land1 FROM kna1 INTO TABLE it_kna1
where kunnr in s_kunnr.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZSCRIPT4'
language = sy-langu.
LOOP AT it_kna1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ELE1'
function = 'SET'
type = 'BODY'
window = 'MAIN'.
DESCRIBE TABLE it_kna1 LINES records.
IF window lt records.
window = window + 1.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-WINDOW'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks,
raji -
How to use the function module ADDRESS_INTO_PRINTFORM?
Hi there,
i need to use the function module ADDRESS_INTO_PRINTFORM. While doing so, I found out that the output parameter ADDRESS_PRINTFORM_TABLE has the District after the City, which is not at all acceptable. I am using the following import parameters only.
ADDRESS_TYPE
ADDRESS_NUMBER
SENDER_COUNTRY
NUMBER_OF_LINES
IV_NATION
Kindly help me to find out what's missing to have the district before the city in the output.Hi
I think, It is because of wrong data maintained in ADRC table.
Check ADRC table. CITY2 is district and CITY1 is city.
In the output of ADDRESS, CITY2(District) has to come first. -
How to use the function module /IRM/IPBB_AGREEMENT_CREATE.
Hi all,
Please help me how to use the function module /IRM/IPBB_AGREEMENT_CREATE.
It is a Vistex fuction module which is used to create Sales contract in SAP-Vistex. If anyone has use the function module and do have the sample code please share it.
Thanks.FORM create_agreement TABLES pt_agreement
CHANGING po_agreement .
CONSTANTS: c_strt_knumh TYPE knumh VALUE '0000000000'.
DATA: lc_kona TYPE /irm/s_gkona,
lc_cbasp TYPE /irm/s_ipcbasp,
lt_cbapr TYPE /irm/t_ipcbapr, "Partners
lc_cbapr TYPE /irm/s_ipcbapr,
lt_cbadt TYPE /irm/t_ipcbadt, "Dates
lc_cbadt TYPE /irm/s_ipcbadt,
lt_cbafs TYPE /irm/t_ipcbafs,
lc_cbafs TYPE /irm/s_ipcbafs,
lt_cbacn TYPE /irm/t_ipcbacn,
lc_cbacn TYPE /irm/s_ipcbacn,
lt_cbacl TYPE /irm/t_ipcbacl,
lc_cbacl TYPE /irm/s_ipcbacl,
lt_cbtpv TYPE /irm/t_ipagtpv,
lc_cbtpv TYPE /irm/s_ipagtpv,
lt_texts TYPE text_lh,
lc_texts TYPE itclh,
lt_cbasd TYPE /irm/t_ipcbasd,
lc_cbasd TYPE /irm/s_ipcbasd,
lc_agreement TYPE /irm/s_ipcbasp_doc,
lc_e_log_number TYPE balognr,
lt_messages TYPE /irm/t_gprolog.
DATA: lt_vake TYPE cond_vakevb_t,
lc_vake TYPE LINE OF cond_vakevb_t,
lt_konh TYPE /irm/t_gkonh,
lc_konh TYPE LINE OF /irm/t_gkonh,
lt_konp TYPE /irm/t_gkonp,
lc_konp TYPE LINE OF /irm/t_gkonp,
lt_konw TYPE /irm/t_gkonwu,
lc_konw TYPE LINE OF /irm/t_gkonwu,
lt_konm TYPE /irm/t_gkonmu,
lc_konm TYPE LINE OF /irm/t_gkonmu,
lt_komg TYPE /irm/t_gkomg_index,
lc_komg TYPE LINE OF /irm/t_gkomg_index,
lt_user_data TYPE /irm/t_gpraxfu_index,
lc_user_data TYPE LINE OF /irm/t_gpraxfu_index.
DATA: lc_updt(1) TYPE c.
DATA: lc_knumh TYPE knumh.
DATA: BEGIN OF lc_str_knumh,
hd(2) TYPE c VALUE '$$',
inc_num(8) TYPE c,
END OF lc_str_knumh.
DATA: blank_agree_key TYPE knuma VALUE '~~~~~~~~~~'.
FIELD-SYMBOLS <konh_line> LIKE LINE OF lt_konh.
FIELD-SYMBOLS <konp_line> LIKE LINE OF lt_konp.
DATA: lc_rule TYPE type_key_rule.
READ TABLE pt_agreement INTO lc_rule INDEX 1.
SELECT SINGLE * FROM kona
WHERE vkorg = lc_rule-vkorg
AND vtweg = '10'
AND spart = '10'
AND boart = 'ZPS1'
AND botext = lc_rule-sap_agkey.
IF sy-subrc = 0.
lc_updt = 'U'.
ELSE.
lc_updt = 'I'.
ENDIF.
LOOP AT pt_agreement INTO lc_rule.
MOVE sy-tabix TO lc_str_knumh-inc_num.
CONDENSE lc_str_knumh-inc_num NO-GAPS.
WHILE lc_str_knumh-inc_num+7(1) = ' '.
CONCATENATE '0' lc_str_knumh-inc_num INTO lc_str_knumh-inc_num.
CONDENSE lc_str_knumh-inc_num NO-GAPS.
ENDWHILE.
CONCATENATE '$$' lc_knumh INTO lc_knumh.
MOVE lc_str_knumh TO lc_knumh.
MOVE c_strt_knumh TO lc_knumh.
CLEAR: lc_konh, lc_konp, lc_komg.
MOVE: lc_rule-vkorg TO lc_komg-komg-vkorg,
'10' TO lc_komg-komg-vtweg,
'10' TO lc_komg-komg-spart,
p_waers TO lc_komg-komg-waerk,
'1300' TO lc_komg-komg-bukrs,
lc_rule-lifnr TO lc_komg-komg-lifnr,
lc_knumh TO lc_komg-knumh,
lc_knumh TO lc_konh-knumh,
lc_knumh TO lc_konp-knumh,
lc_rule-datab TO lc_konh-datab,
lc_rule-datbi TO lc_konh-datbi.
CASE lc_rule-tablnam.
WHEN 'A701'. "Every Agreement will have a A701 rule -
"Therefore we acn setup the header using A701
MOVE: 'New ' TO lc_kona-knuma,
lc_rule-vkorg TO lc_kona-vkorg,
'10' TO lc_kona-vtweg,
'10' TO lc_kona-spart,
'ZPS1' TO lc_kona-boart,
'C' TO lc_kona-abtyp,
'V' TO lc_kona-kappl,
p_waers TO lc_kona-waers,
lc_rule-knuma_ag TO lc_kona-abrex,
'ZPS2' TO lc_kona-kobog,
lc_rule-datab TO lc_kona-datab,
lc_rule-datbi TO lc_kona-datbi,
lc_rule-sap_agkey TO lc_kona-botext,
'1300' TO lc_kona-bukrs,
'I' TO lc_kona-updkz.
MOVE: 'New ' TO lc_cbasp-knuma_ag,
'ZPS1' TO lc_cbasp-boart_ag,
p_waers TO lc_cbasp-waers,
'A' TO lc_cbasp-setl_mth,
'B' TO lc_cbasp-setl_typ,
'A2' TO lc_cbasp-ident,
'E' TO lc_cbasp-setlm,
'ZPDA' TO lc_cbasp-pargr,
'X' TO lc_cbasp-npric,
'LF' TO lc_cbasp-stprl,
lc_rule-lifnr TO lc_cbasp-stpar,
lc_rule-contract_rev TO lc_cbasp-rvnum,
'I' TO lc_cbasp-updkz.
CONCATENATE: blank_agree_key
lc_rule-lifnr INTO lc_konh-vakey.
MOVE: lc_rule-lifnr TO lc_konp-lifnr.
WHEN 'A703'.
CONCATENATE: blank_agree_key
lc_rule-kunnr INTO lc_konh-vakey.
MOVE lc_rule-kunnr TO lc_komg-komg-kunnr.
WHEN 'A709'.
CONCATENATE: blank_agree_key
lc_rule-zzprodh1 lc_rule-zzprodh2 lc_rule-zzprodh3
lc_rule-zzprodh4 lc_rule-zzprodh5 INTO lc_konh-vakey.
CONCATENATE: lc_rule-zzprodh1 lc_rule-zzprodh2 lc_rule-zzprodh3
lc_rule-zzprodh4 lc_rule-zzprodh5 INTO lc_komg-komg-prodh.
WHEN 'A710'.
CONCATENATE: blank_agree_key
lc_rule-matkl INTO lc_konh-vakey.
MOVE lc_rule-matkl TO lc_komg-komg-matkl.
WHEN 'A711'.
CONCATENATE: blank_agree_key
lc_rule-matnr INTO lc_konh-vakey.
MOVE lc_rule-matnr TO lc_komg-komg-matnr.
IF lc_rule-kschl = 'ZPPL'.
MOVE: 'C' TO lc_konp-krech,
'CAD' TO lc_konp-konwa.
lc_konp-kbetr = lc_rule-net_po_price * 1.
ENDIF.
WHEN 'A717'.
WHEN 'A718'.
CONCATENATE: blank_agree_key
lc_rule-zzextwg INTO lc_konh-vakey.
MOVE lc_rule-zzextwg TO lc_komg-komg-zzextwg.
WHEN 'A719'.
CONCATENATE: blank_agree_key
lc_rule-werks INTO lc_konh-vakey.
MOVE lc_rule-werks TO lc_komg-komg-werks.
WHEN 'A721'.
CONCATENATE: blank_agree_key
lc_rule-kunnr lc_rule-werks INTO lc_konh-vakey.
MOVE: lc_rule-kunnr TO lc_konp-kunnr,
lc_rule-kunnr TO lc_komg-komg-kunnr.
WHEN 'A722'.
CONCATENATE: blank_agree_key
lc_rule-vkbur INTO lc_konh-vakey.
MOVE lc_rule-vkbur TO lc_komg-komg-vkbur.
WHEN 'A724'.
CONCATENATE: blank_agree_key
lc_rule-kunnr lc_rule-vkbur INTO lc_konh-vakey.
MOVE: lc_rule-kunnr TO lc_konp-kunnr,
lc_rule-kunnr TO lc_komg-komg-kunnr,
lc_rule-vkbur TO lc_komg-komg-vkbur.
ENDCASE.
MOVE: 'A' TO lc_konh-kvewe,
lc_rule-tablnam+1(3) TO lc_konh-kotabnr,
lc_rule-kappl TO lc_konh-kappl,
lc_rule-kschl TO lc_konh-kschl.
REPLACE ALL OCCURRENCES OF '~' IN lc_konh-vakey WITH ' '.
APPEND lc_konh TO lt_konh.
CLEAR lc_konh.
*--- Add in the KONP.Do we need to add
MOVE: lc_rule-kappl TO lc_konp-kappl,
lc_rule-kschl TO lc_konp-kschl,
'G' TO lc_konp-krech.
IF lc_rule-kschl+3(1) = '%'.
MOVE: 'A' TO lc_konp-krech,
'%' TO lc_konp-konwa.
lc_konp-kbetr = lc_rule-rebate_perc * 1.
ENDIF.
APPEND lc_konp TO lt_konp. CLEAR lc_konp.
APPEND lc_komg TO lt_komg. CLEAR lc_komg.
ENDLOOP.
IF lc_updt = 'I'.
CALL FUNCTION '/IRM/IPCB_AGREEMENT_CREATE'
EXPORTING
I_MESSAGES_DISPLAY = ' '
I_SAVE_MESSAGES = ' '
I_COMMIT_WORK = 'X'
I_CALL_FROM_WS = ' '
is_kona = lc_kona
is_cbasp = lc_cbasp
it_cbapr = lt_cbapr
it_cbadt = lt_cbadt
it_cbafs = lt_cbafs
it_cbacn = lt_cbacn
it_cbacl = lt_cbacl
it_cbtpv = lt_cbtpv
it_texts = lt_texts
it_cbasd = lt_cbasd
IMPORTING
es_agreement = lc_agreement
e_log_number = lc_e_log_number
TABLES
t_messages = lt_messages
CHANGING
CT_VAKE = lt_vake
ct_konh = lt_konh
ct_konp = lt_konp
CT_KONW = lt_konw
CT_KONM = lt_konm
ct_komg = lt_komg
CT_USER_DATA = lt_usr_data
EXCEPTIONS
no_documents_to_process = 1
no_authorization = 2
creation_failed = 3
new_pricing_not_maitained = 4
OTHERS = 5.
IF sy-subrc <> 0.
Implement suitable error handling here
ELSE.
MOVE: lc_agreement-knuma_ag TO po_agreement,
lc_agreement-knuma_ag TO lc_kona-knuma.
ENDIF.
APPEND LINES OF lt_messages TO gt_messages.
ELSE.
MOVE-CORRESPONDING kona TO lc_kona.
ENDIF.
LOOP AT lt_konh ASSIGNING <konh_line>.
MOVE lc_kona-knuma TO <konh_line>-vakey+0(10).
move '&' to <konh_line>-knumh+0(1).
ENDLOOP.
LOOP AT lt_konp ASSIGNING <konp_line>.
MOVE lc_kona-knuma TO <konp_line>-vakey+0(10).
move '&' to <konh_line>-knumh+0(1).
ENDLOOP.
lc_kona-updkz = 'U'.
lc_cbasp-updkz = 'U'.
CLEAR lt_messages.
CALL FUNCTION '/IRM/IPCB_AGREEMENT_CHANGE'
EXPORTING
I_MESSAGES_DISPLAY = ' '
I_SAVE_MESSAGES = ' '
I_COMMIT_WORK = 'X'
I_INIT_DATA = 'X'
is_kona = lc_kona
is_cbasp = lc_cbasp
it_cbapr = lt_cbapr
it_cbadt = lt_cbadt
it_cbafs = lt_cbafs
it_cbacl = lt_cbacl
it_cbacn = lt_cbacn
IT_FIELDS =
it_texts = lt_texts
IMPORTING
e_log_number = lc_e_log_number
TABLES
t_messages = lt_messages
CHANGING
cs_agreement = lc_agreement
CT_VAKE = lt_vake
ct_konh = lt_konh
ct_konp = lt_konp
CT_KONW = lt_konw
CT_KONM = lt_konm
ct_komg = lt_komg
CT_USER_DATA = lt_usr_data
EXCEPTIONS
no_documents_to_process = 1
no_authorization = 2
change_failed = 3
agreement_locked = 4
OTHERS = 5.
IF sy-subrc <> 0.
Implement suitable error handling here
ENDIF.
APPEND LINES OF lt_messages TO gt_messages.
ENDFORM. " CREATE_AGREEMENT -
How to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'
Dear Experts,
Can anyone Explain me how to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'.My Requirement is i want to change the Partners of the Service Order.It is Very Urgent Requirement Please Help me.
Thanks & Regards,
Ashok.Hi,
For service order you can use FM 'BAPI_ACTIVITYCRM_CHANGEMULTI' as it is much easier to use.
Sample code is below. You can use that:
"fill the details of partner which is
"to be added as main partner or in place of Interaction Agent
wa_partner_new-ref_guid = w_guid_ref.
wa_partner_new-ref_handle = '0000000000'.
wa_partner_new-ref_kind = 'A'.
wa_partner_new-kind_of_entry = wa_partner-kind_of_entry.
wa_partner_new-ref_partner_handle = '0000'.
wa_partner_new-ref_partner_fct = 'Z_IA'.
"wa_partner-partner_no : New partner no.
wa_partner_new-ref_partner_no = wa_partner-partner_no.
wa_partner_new-ref_no_type = wa_partner-ref_no_type.
wa_partner_new-ref_display_type = wa_partner-ref_display_type.
wa_partner_new-display_type = 'BP'.
wa_partner_new-no_type = 'BP'.
wa_partner_new-partner_fct = 'Z_IA'.
"w_partner_no : Old partner no. which is to be changed
wa_partner_new-partner_no = w_partner_no.
wa_partner_new-mainpartner = 'X'.
INSERT wa_partner_new INTO TABLE it_partner_new.
wa_partner_newx-display_type = 'X'.
wa_partner_newx-no_type = 'X'.
wa_partner_newx-partner_fct = 'X'.
wa_partner_newx-partner_no = 'X'.
wa_partner_newx-mainpartner = 'X'.
INSERT wa_partner_newx INTO TABLE it_partner_newx.
IF it_partner_new[] IS NOT INITIAL AND it_partner_newx[] IS NOT INITIAL.
"maintain all changes to be done
CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
TABLES
partner = it_partner_new
partnerx = it_partner_newx.
CLEAR : wa_guid1.
REFRESH : it_guid1.
wa_guid1-guid = w_guid_ref.
APPEND wa_guid1 TO it_guid1.
"save the changes
CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
TABLES
objects_to_save = it_guid1.
"commit the transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Reply fro any further help.
Please reward points if helpful.
Regards,
Ashlesha -
How can and where i use the function "HTMLDB_UTIL.CLEAR_PAGE_CACHE "
how can and where i use the function "HTMLDB_UTIL.CLEAR_PAGE_CACHE " ?
where is the place to put this function?i have notice that sometime, during visual a report of a table, order by data insert desc, some record are not displayed on some client.
Only whe we clear the cache of internet explorer than this record can view.
I have an idea that a clear page when i call the report may be solve the problem.
Thank's.
------------------------ -
Jobs to run the function modules to extract the generic extarctors
Gurus,
I have a Datasource 'ZCMS_PP_TRAN' with extract structure 'ZBW_ST_CMSD_PP'. The extract structure is populated using the function module Z_BW_GET_CMSD_PP.
But how do I schedule this FM or in general, are they run using std programs?
Thanks,
SimmiHi Simmi,
what ever it may be the DS(i mean Business Content DS, Generic DS).... these will extract the Data using Dynamic Function Calls(not always). Comming to Generic DS using FM, this will be called using Dynamic Function Module.
In RSA3 or while extracting data from BW, you will pass request number, Update Mode, debugging option, selection fields, BW source System ID, DS Name.
Based on these details system will extract the underlying extract structure and function module(or table/view/infoset).
No job(Job created from BW while extracting data in the source system BI_requestid) created for Generic DS while extracting data in SAP.
For Queue Delta, Background job will be created, it will move the data to Delta Queue.
i will update the thread with related function modules. Try to debugg in RSA3, you could find all the information.
all the best.
Nagesh. -
Error while using the function module..pack_handling_unit_dlvry
Hi all...
while using the function module pack_handling_unit_dlvry,
we need to pass the handling unit number as per the functionality we require.
but the mandatory field for the function module is the handling unit number in the form of bar code..
so how to use this function module..
All the useful answers will be regarded..
Regards,
Saroja.Have you tried using BAPI BAPI_HU_CREATE. Also view Function Module Documentation on its usage.
-
Hi all,
when i am trying to upload the excel template by using the function module " KCD_EXCEL_OLE_TO_INT_CONVERT" to an internal table some field values are missing.
i am using the function module " KCD_EXCEL_OLE_TO_INT_CONVERT" and i am uploading an excel template and downloading that excel data into an internal table but some field values are missing while uploading the excel template and i found that the field which contains the drop down list values those values are missing.
And also when i am uploading the excel template by using the function module" KCD_EXCEL_OLE_TO_INT_CONVERT" when i am coming out of this function module one pop up is coming. how can i avoid this popup, can any one please provide me the solution thanks in advance.
FYI...it is showing the below popup screen ..
Thanks,
Koushikhi Feiyun,
below is the code(highlighted in bold)and after coming out of the function module i am getting popup and also the drop down values are missing.
DATA: ls_control TYPE zsfi_fiupload_control,
ls_header TYPE zsfi_fiupload_header_v13,
ls_item TYPE zsfi_fiupload_item_v13,
ls_trailer TYPE zsfi_fiupload_control,
l_line_count LIKE zsfi_fiupload_control-rec_count,
l_current_curr TYPE kcde_cells-value,
l_current_postdate TYPE kcde_cells-value,
l_current_compcode TYPE kcde_cells-value,
l_currentrow TYPE kcde_cells-row,
l_filename LIKE rlgrap-filename.
DATA: BEGIN OF lt_intern OCCURS 0.
INCLUDE STRUCTURE kcde_cells.
DATA: END OF lt_intern.
DATA: BEGIN OF lt_items OCCURS 0,
a TYPE kcde_cells-value,
b TYPE kcde_cells-value,
c TYPE kcde_cells-value,
d TYPE kcde_cells-value,
e TYPE kcde_cells-value,
f TYPE kcde_cells-value,
g TYPE kcde_cells-value,
h TYPE kcde_cells-value,
i TYPE kcde_cells-value,
j TYPE kcde_cells-value,
k TYPE kcde_cells-value,
l TYPE kcde_cells-value,
m TYPE kcde_cells-value,
n TYPE kcde_cells-value,
o TYPE kcde_cells-value,
p TYPE kcde_cells-value,
q TYPE kcde_cells-value,
r TYPE kcde_cells-value,
s TYPE kcde_cells-value,
t TYPE kcde_cells-value,
u TYPE kcde_cells-value,
v TYPE kcde_cells-value,
w TYPE kcde_cells-value,
x TYPE kcde_cells-value,
y TYPE kcde_cells-value,
z TYPE kcde_cells-value,
aa TYPE kcde_cells-value,
ab TYPE kcde_cells-value,
ac TYPE kcde_cells-value,
ad TYPE kcde_cells-value,
ae TYPE kcde_cells-value,
af TYPE kcde_cells-value,
ag TYPE kcde_cells-value,
ah TYPE kcde_cells-value,
ai TYPE kcde_cells-value,
AJ TYPE KCDE_CELLS-VALUE,
AK TYPE KCDE_CELLS-VALUE,
END OF lt_items.
l_filename = p_flpath.
* the file must be an xls file, not xlsx or comma seperated
IF p_flpath NS '.xls' AND p_flpath NS '.XLS'.
MESSAGE i261(zfi).
g_error = 'X'.
EXIT.
ENDIF.
* upload excel file to a generic table
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = l_filename
i_begin_col = 1
i_begin_row = 1
i_end_col = 150
i_end_row = 65000
TABLES
intern = lt_intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* validate that the format is in the restatement format
* this is the only template to have the ledger group in cell G-2
** READ TABLE lt_intern WITH KEY row = '0002' col = '0007'.
** IF sy-subrc <> 0 OR lt_intern-value IS INITIAL.
** MESSAGE i260(zfi).
** g_error = 'X'.
** EXIT.
** ENDIF.
* create control record values
ls_control-rec_type = 'C'.
ls_control-global_id = 'GLU-03000'.
ls_control-local_id = ''.
ls_control-rec_count = ''.
CONCATENATE sy-datum sy-uzeit INTO ls_control-date.
ls_control-version = '12'.
ls_control-email = ''.
ls_control-eor = 'X'.
ls_trailer = ls_control.
* open output file and add the control record
OPEN DATASET p_unixfilename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
TRANSFER ls_control TO p_unixfilename.
* create header record values, will be transfered to file in the item loop
ls_header-rec_type = 'H'.
READ TABLE lt_intern WITH KEY row = '0017' col = '0003'.
IF sy-subrc = 0.
ls_header-header_txt = lt_intern-value.
ENDIF.
READ TABLE lt_intern WITH key row = '0020' col = '0002'.
IF sy-subrc = 0.
ls_header-comp_code = lt_intern-value.
ENDIF.
************doc date
READ TABLE lt_intern WITH KEY row = '0011' col = '0003'.
IF sy-subrc = 0.
ls_header-pstng_date = lt_intern-value.
ENDIF.
************posting date
ls_header-doc_date = sy-datum.
READ TABLE lt_intern WITH KEY row = '0009' col = '0003'.
IF sy-subrc = 0.
ls_header-doc_type = lt_intern-value.
ENDIF.
READ TABLE lt_intern WITH KEY row = '0014' col = '0003'.
IF sy-subrc = 0.
ls_header-ref_doc_no = lt_intern-value.
ENDIF.
************currency moved to line items
READ TABLE lt_intern WITH KEY row = '0020' col = '0001'.
IF sy-subrc = 0.
ls_header-currency = lt_intern-value.
ENDIF.
ls_header-trans_date = ''.
READ TABLE lt_intern WITH KEY row = '0010' col = '0003'.
IF sy-subrc = 0.
ls_header-period = lt_intern-value.
ENDIF.
READ TABLE lt_intern WITH KEY row = '0006' col = '0003'.
IF sy-subrc = 0.
ls_header-reason_rev = lt_intern-value.
ENDIF.
READ TABLE lt_intern WITH KEY row = '0007' col = '0003'.
IF sy-subrc = 0.
ls_header-rev_date = lt_intern-value.
ENDIF.
* READ TABLE lt_intern WITH KEY row = '0002' col = '0007'.
* IF sy-subrc = 0.
ls_header-ledger_grp = ''.
* ENDIF.
* READ TABLE lt_intern WITH KEY row = '0013' col = '0013'.
* IF sy-subrc = 0.
ls_header-exch_rate = ''.
* ENDIF.
READ TABLE lt_intern WITH KEY row = '0008' col = '0003'.
IF sy-subrc = 0.
ls_header-calc_tax = lt_intern-value.
ENDIF.
ls_header-eor = 'X'.
* loop at the line items and append them to a table with multiple columns
LOOP AT lt_intern WHERE row GE 20.
IF l_currentrow <> lt_intern-row AND l_currentrow IS NOT INITIAL.
APPEND lt_items.
CLEAR lt_items.
ENDIF.
l_currentrow = lt_intern-row.
CASE lt_intern-col.
WHEN '0001'. lt_items-a = lt_intern-value.
WHEN '0002'. lt_items-b = lt_intern-value.
WHEN '0003'. lt_items-c = lt_intern-value.
WHEN '0004'. lt_items-d = lt_intern-value.
WHEN '0005'. lt_items-e = lt_intern-value.
WHEN '0006'. lt_items-f = lt_intern-value.
WHEN '0007'. lt_items-g = lt_intern-value.
WHEN '0008'. lt_items-h = lt_intern-value.
WHEN '0009'. lt_items-i = lt_intern-value.
WHEN '0010'. lt_items-j = lt_intern-value.
WHEN '0011'. lt_items-k = lt_intern-value.
WHEN '0012'. lt_items-l = lt_intern-value.
WHEN '0013'. lt_items-m = lt_intern-value.
WHEN '0014'. lt_items-n = lt_intern-value.
WHEN '0015'. lt_items-o = lt_intern-value.
WHEN '0016'. lt_items-p = lt_intern-value.
WHEN '0017'. lt_items-q = lt_intern-value.
WHEN '0018'. lt_items-r = lt_intern-value.
WHEN '0019'. lt_items-s = lt_intern-value.
WHEN '0020'. lt_items-t = lt_intern-value.
WHEN '0021'. lt_items-u = lt_intern-value.
WHEN '0022'. lt_items-v = lt_intern-value.
WHEN '0023'. lt_items-w = lt_intern-value.
WHEN '0024'. lt_items-x = lt_intern-value.
WHEN '0025'. lt_items-y = lt_intern-value.
WHEN '0026'. lt_items-z = lt_intern-value.
WHEN '0027'. lt_items-aa = lt_intern-value.
WHEN '0028'. lt_items-ab = lt_intern-value.
WHEN '0029'. lt_items-ac = lt_intern-value.
WHEN '0030'. lt_items-ad = lt_intern-value.
WHEN '0031'. lt_items-ae = lt_intern-value.
WHEN '0032'. lt_items-af = lt_intern-value.
WHEN '0033'. lt_items-ag = lt_intern-value.
WHEN '0034'. lt_items-ah = lt_intern-value.
WHEN '0035'. lt_items-ai = lt_intern-value.
when '0036'. lt_items-aj = lt_intern-value.
when '0037'. lt_items-ak = lt_intern-value.
ENDCASE.
ENDLOOP.
APPEND lt_items.
* sort rows by the post date, comp code, curr.
* SORT lt_items BY ah a ai.
* loop at the items, creating a header record if the comp code, curr. or post date changes
LOOP AT lt_items.
ls_item-rec_type = 'I'.
ls_item-post_key = lt_items-c. "lt_items-b.
IF lt_items-c GE '20' AND lt_items-c LE '39'.
ls_item-vendor_no = lt_items-d.
ELSEIF lt_items-c GE '0' AND lt_items-c LE '19'.
ls_item-customer = lt_items-d.
ELSEIF lt_items-c EQ '70' AND lt_items-c EQ '75'.
ls_item-asset = lt_items-d.
ELSE.
ls_item-gl_account = lt_items-d.
ENDIF.
ls_item-asset_type = lt_items-m. "lt_items-l.
ls_item-trans_type = lt_items-n. "lt_items-m.
ls_item-print_flag = ''.
ls_item-item_text = lt_items-j. "lt_items-i.
ls_item-comp_code = lt_items-b. "lt_items-a.
ls_item-bus_area = ''.
ls_item-alloc_nmbr = lt_items-l. "lt_items-k.
ls_item-tax_code = lt_items-q. "lt_items-p.
ls_item-taxjurcode = lt_items-r. "lt_items-q.
ls_item-profit_ctr = lt_items-g. "lt_items-f.
ls_item-costcenter = lt_items-h. "lt_items-g.
ls_item-orderid = lt_items-ac. "lt_items-ab.
ls_item-wbs = lt_items-i. "lt_items-h.
ls_item-trade_id = lt_items-o. "lt_items-n.
ls_item-part_prctr = lt_items-p. "lt_items-o.
ls_item-material = lt_items-t. "lt_items-s.
ls_item-salesorg = lt_items-aa. "lt_items-z.
ls_item-distr_chan = lt_items-ab. "lt_items-aa.
ls_item-pmnttrms = ''.
ls_item-pmtmthd = ''.
ls_item-pmtmthsupl = ''.
ls_item-alt_payee = ''.
REPLACE ALL OCCURRENCES OF '(' IN lt_items-e WITH ''.
REPLACE ALL OCCURRENCES OF ')' IN lt_items-e WITH ''.
ls_item-amt_doccur = lt_items-e. "lt_items-d
REPLACE ALL OCCURRENCES OF '(' IN lt_items-f WITH ''.
REPLACE ALL OCCURRENCES OF ')' IN lt_items-f WITH ''.
ls_item-loc_amt = lt_items-f. "lt_items-e
ls_item-loc = lt_items-k. "lt_items-j.
ls_item-sas_revtype = lt_items-s. "lt_items-r.
ls_item-rev_type = lt_items-u. "lt_items-t.
ls_item-rev_chnl = lt_items-v. "lt_items-u.
ls_item-bill_to = lt_items-x. "lt_items-w.
ls_item-payer = lt_items-z. "lt_items-y.
ls_item-ship_to = lt_items-y.
ls_item-tax_amnt = lt_items-x.
ls_item-func_area = ''.
ls_item-expend_date = lt_items-ae. "lt_items-ad.
ls_item-wtax_code = lt_items-af. "lt_items-ae.
ls_item-wtax_base = lt_items-ag. "lt_items-af.
ls_item-wtax_amount = lt_items-ah. "lt_items-ag.
ls_item-payment_block = ''.
ls_item-grp_amt = ''.
ls_item-anc_amt = ''.
ls_item-permit_payee = ''.
ls_item-value_date = ''.
ls_item-pernr = ''.
ls_item-legacy1 = ''.
ls_item-legacy2 = ''.
ls_item-legacy3 = ''.
ls_item-legacy4 = ''.
ls_item-legacy5 = ''.
ls_item-legacy6 = ''.
ls_item-legacy7 = ''.
ls_item-legacy8 = ''.
ls_item-legacy9 = ''.
ls_item-legacy10 = ''.
ls_item-eor = 'X'.
TRANSLATE lt_items-ai TO UPPER CASE.
TRANSLATE lt_items-b TO UPPER CASE.
TRANSLATE lt_items-a TO UPPER CASE.
TRANSLATE lt_items-aj TO UPPER CASE.
IF l_current_curr <> lt_items-a "lt_items-ai
OR l_current_postdate <> ls_header-pstng_date "lt_items-aj
OR l_current_compcode <> lt_items-b.
l_current_curr = lt_items-a.
l_current_postdate = ls_header-pstng_date. "lt_items-aj.
l_current_compcode = lt_items-b.
ls_header-comp_code = l_current_compcode.
ls_header-currency = l_current_curr.
ls_header-pstng_date = l_current_postdate.
ls_header-doc_date = l_current_postdate.
TRANSFER ls_header TO p_unixfilename.
l_line_count = l_line_count + 1.
ENDIF.
TRANSFER ls_item TO p_unixfilename.
l_line_count = l_line_count + 1.
ENDLOOP.
ls_trailer-rec_type = 'T'.
ls_trailer-rec_count = l_line_count.
TRANSFER ls_trailer TO p_unixfilename.
CLOSE DATASET p_unixfilename.
* change the format to fixed format for the remainder of the load program
p_fixed = 'X'.
p_rstmnt = ''.
Thanks,
Koushik -
How do we trap exception inside the function module?
How do we trap exception inside the function module?
Use ABAP Help - CATCH, RAISE for starters. Or take a look at an existing function module, for example.
Maybe you are looking for
-
Ink....Suggestion and a new PRINTER suggestion
We should have other kinds of ink that we can install - for example, for those of us that do Scrapbooking wouldn't it be nice to have NEON ink kits, or Glitter Ink kits, also, if we are a cake decorator, why can we only have two kinds of printers? Wh
-
Application is not working due to memory issue
Hi Friesnds, Kindly help me regarding settings in java. Scenario is like that. I have one server having two jboss versions (jboss-4.2.3 GA and jboss- 3.2.6). Each having java memory (JVM settings) 1 GB. The total memory of that server is 3 GB. Proble
-
I already have done OTC cycle. Now i want to Run Returns Scenario. Please Give me suggestions what are the pre requisites to process RE. where I need to Tweak the system so that i can run RE. ALL IMG Activity including Answers will be Appriciated Reg
-
Error with Scheduling a Report to run in SSRS 2000
Getting the below error when trying to schedule the report to run. I can run the report just fine as a stand-alone and not thru the scheduler. I have several others that run just fine in the same way. ReportingServicesService!processing!5d4!8/24/2010
-
Ethernet not working on brand new portable
Ethernet not working. This is a new portable. Troubleshooting message: The realtek PCIe GBE family controller adapter is experiencing driver or hardware related problems. Reinstalled the driver multiple times . Reinstalled the portable to factory def