Create a rule in Rule Editor using a function module
Hello all,
I want to create a rule using Rule Editor.
As the requirements are complex, I created a function module; and I want the rule to call the function module
My company already done this in the past, but the function module was supposed to fill a composition
Here, it is a little bit different because I want the function module to fill characteristics in a property. I've tried to create the rule on rule editor which will call the function module but is doesn't work
Have some of you already used rule editor with a function module?
If yes, can you tell me if there are some "mandatory" parameters to add in Rule Editor to allow it to work?
Thanks for your help on this topic
Regards
Stephanie
Hi,
There is well defined pdf is exist on google. please search and help yourself.
Use google search term "How to Write a Routine for 0CALDAY in infopackage selections".
Let me help you how to find it.
Let me google that for you
Thanks
Similar Messages
-
Use of function module BBP_PDH_WFL_APPROVAL_SIMULATE
Dear SAP Gurus,
We have build a custom check in the BBP_DOC_CHECK_SC Badi to check if an approver is added to the Shopping cart.
In case of creating a Shopping Cart we can use the function module BBP_PDH_WFL_APPROVER_CHECK to check if an approver is added.
In case of a Shopping Cart with status held, in case of the Shopping Cart in approval or in case of the Shopping Cart is disapprvod we can't use the function module BBP_PDH_WFL_APPROVER_CHECK. Because it's not checking correctly if the approver exist.
In those case we use the function module BBP_PDH_WFL_APPROVAL_SIMULATE to check if en approver exist in the workflow. But we encounter a problem when using this function module.
When the requester wants to add an approver, the requester first searches for the approver and then click on add approver. Then nothing happens. The approver isn't added to the workflow and in case there was no approver anymore (after disapproving the SC) first an error message is displayed but after performing the add approver task the error message isn't displayed anymore and the approver isn't visible in the workflow.
Add an approver is also not possible when there is already an approver of no approver and the SC is put on Held. Then the same happens. Search for approver and click on Add Approver no approver is added.
We think this has something to do with function module BBP_PDH_WFL_APPROVAL_SIMULATE.
Has anyone some ideas how we can solve this? Check if approver exist in the workflow and still be abble to add an approver.
We are on SRM 4.0 with ECC 6.0 in Extended Classic Scenario.
Thank you in advance for your replies.
Best regards,
Jean-PierreHi,
In my current project, there is a requirement to forward approver to other approver.
Something like tcode SWIA when forwarding a workitem.
In order to list approver of particular document, I am using BBP_PDH_WFL_APPROVAL_SIMULATE to needed parameters to run following FM BBP_PDH_WFL_PARAM_APPLET_FILL2.
From FM BBP_PDH_WFL_PARAM_APPLET_FILL2, I know whether the document has approver assigned or not.
Hopefully can help you. -
Using a function module i want to create another function module
Hi all,
My requirement is by using a function module i want to create another function module(if needs modify action should also be done if i need this is for the created function module) and the main thing is that the function module which we are used to create is should be RFC enabled.
Thanks,
Vichu.Hi,
You can do one thing... you write the BDC code in the function module name you are creating... so that if you call the function module in a program and execute that program and if you give the function module to be created in the selection screen of the program... in this way there is chance of creating another function module.
Hope this would help you.
Good luck
Narin -
Creating/confirming transfer order (WM) using bapi/function modules
Hi,
I usually use BDC to create transfer orders or other documents in WM, but i've been told that using BAPI is more correct. I'm new to this concept, so could you please tell me how i can find the apropriate BAPI/function modules available for this purpose in 46C ?
I thank you in advance,
BrunoHi Gisk,
i am trying ot create a TO based on a material document and year. Same function as transaction LB12. Do you know which function module i can use for this.
I am trying to use the function module L_TO_CREATE_SINGLE, i fill in the T_LTAK-MBLNR and T_LTAK-MJAHR. But do not know which fields to fill in.
Hope you can help me.
Grtz
Coeno -
How to create textpool by using standard function module?
hi,
gurus.
I have find two function modules ( RS_TEXTPOOL_READ / BX_AGR_READ_TEXTPOOL ) which is used to read but i want to write into the textpool is there any standard function moduleREPORT ZTEST1.
WRITE : / 'ddddddd'.
WRITE : / 'ddddddd'.
WRITE: / 'hhhhhhh'.
WRITE: / 'ddddddd'.
WRITE: / 'ddddddd' , 'uuuuuuuu'.
WRITE: / 'ddddddd', 'sssssssss'.
for example i am this report i want to convert it into text elements like
REPORT ZTEST1.
WRITE : / 'text-001'.
WRITE : / 'text-001'.
WRITE: / 'text-002''.
WRITE: / 'text-001''.
WRITE: / 'text-001'' , 'text-003''.
WRITE: / 'text-001'', 'text-004'.
this elements also store into the textpool so how can we achieve this functionality by using standard function module.
can any body give some idea .
shabeer ahmed -
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 BAPI_MATERIAL_AVAILABILITY Function Module at batch level?
How to use BAPI_MATERIAL_AVAILABILITY FM to check material available at batch level?
And another question is what's the meaning of 'CHECK_RULE' in this FM. Thanks!Field name : PRREG
fcheck more details on f1 help...
check_group defines the checking procedure to be used for availability check in individual applications.
along with the checkg group, checking rule specifies the final procedure for chkg..
eg:
ST for stock transport order
AQ for SD order project srock
also chk this help doc.
http://help.sap.com/saphelp_470/helpdata/en/cf/70124adf2d11d1b55e0000e82de178/content.htm
search the forum for sample code..
How to use BAPI_MATERIAL_AVAILABILITY Function Module.... -
How to use BAPI_MATERIAL_AVAILABILITY Function Module....
Hi Experts,
I want to know actual free available quantity (ATP Qty.) for mass materials,
How to use BAPI_MATERIAL_AVAILABILITY function module ?
I have select all material from MARA and inserted in itab.
LOOP AT ITAB.
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
PLANT =
MATERIAL =
UNIT =
CHECK_RULE =
STGE_LOC =
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
DEC_FOR_ROUNDING =
DEC_FOR_ROUNDING_X =
READ_ATP_LOCK =
READ_ATP_LOCK_X =
IMPORTING
ENDLEADTME =
AV_QTY_PLT =
DIALOGFLAG =
RETURN =
TABLES
WMDVSX =
WMDVEX =
I dont know how to use it.
pl. guide us.
YusufHi,
data: iwmdvsx type table of bapiwmdvs with header line,
iwmdvex type table of bapiwmdve with header line.
parameters: p_matnr type mara-matnr,
p_werks type marc-werks,
p_meins type mara-meins.
call function 'BAPI_MATERIAL_AVAILABILITY'
exporting
plant = p_werks
material = p_matnr
unit = p_meins
CHECK_RULE =
STGE_LOC =
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
IMPORTING
ENDLEADTME =
AV_QTY_PLT =
DIALOGFLAG =
RETURN =
tables
wmdvsx = iwmdvsx
wmdvex = iwmdvex.
check sy-subrc = 0.
Text
ATP information
Functionality
Using this function module, you can determine the receipt quantity still available for a particular material in a certain plant according to ATP logic (MRPII).
The availability check is carried out on transferring the material number, the plant and the input table (WMDVSX). The scope of the check, that is, which stocks, receipts and issues are to be included in the check is defined by the combination of checking group (material master) and cheking rule. In the function module, the system uses the checking rule defined in Sales & Distribution (A). You can overrule this checking rule by using an interface or a user-exit (exit_saplw61v_001). A similar procedure is also valid for the plant parameters. The customer number in the user-exit means that the plant selection can be controlled via the customer. If no plant parameters are given via the interface, the system uses the parameter 'WRK' saved in the user's fixed values.
The results of the availability check are recorded in the output table (WMDVEX). This table contains dates and available receipt quantities (ATP quantities). The results of the check depends on the following entries:
If no date and no quantity is transferred, the system displays the ATP situation from today's date into the future as the result.
If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:
' ' (blank) <=> quantity completely available
'X' <=> only partial quantity available or not available at
all
'N' <=> Material not included in the availability check
(Material not relevant to the availability check)
The system also displays the end of the replenishment lead time (ENDLEADTME).
regards -
How to Use ECC function Module
Hi Experts - We need to execute the function module in ECC and need to write data in Oracle table.
We are using BODS 4.0.
How to use function module in data flow ? how it can work as a source ?
I just need some basic steps how to use function module as a source and do the transformation to target.
Thanks
RHi Ashwani,
It is still not possible to use a FM as a source in DS.
You can use a FM in a transformation but you have to start from a file or table as a source and load into a target (a FM can not be an end point of a dataflow - as it is used in the transformation and each transformation requires a source and a target.
The scenario I described above was based on a situation where you have a source (flat file or table) and want to use a Function Module to transform your data and/or load the data in a transparant table in SAP.
Your scenario is different, as your source is not a table/ff but a FM.
In your case, I can see two scerio's:
- Use an ABAP dataflow. Although I haven't got any experience with this I do believe this would be an option for your scenario. Please referer to the Data Services documentation on ABAP dataflows for further guidance.
- As suggested earlier, you can create a bespoke (BW) Datasource based on a Function Module. Please refer to SAP help for creating a generic datasource:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
Depending on your scenario there might be a third option:
- Use a SAP transparant table as a source. Create a transformation into the designated Oracle table. In the transformation call a FM which executes whatever logic you require. This solution will work if you have a table which produces the same number of records as your FM. If your function module produces more or less records (than there are in the transparant table), then this might become a bit tricky. It might work, but I have never tried it.
Instead of a transparant table you can also use a table join, obviously. Perhaps part of the complexity of your FM could be resolved by using a join and you can create a new simpler FM for the remaining logic?
Good luck,
Jan. -
Hi Gurus,
can any one inform me,how to use SX_OBJECT_CONVERT_OTF_INTO_PDF function module in script..
how can we convert the script output into pdf file format....
i need your help......plz
my mail id : [email protected]
Thanks,
Rajkumar.A
Edited by: rajkumar annadurai on Feb 19, 2008 10:25 AMHi, Dear
In XI 3.0 we are tyring to setup SAPconnect;
1 Step; Create RFC connection for Mlunxsnd file, anyway!!! we download thease file and create RFC connection; fine working no error
2 Step: Create Nodes T-code SCOT => connection INT => and support address type like Internet its just show only "PDF, HTM, TXT" thats it its not show some others format
3. Step; When check email T-code SOST Getting an error messages: "Connot process message in node, parameters cannot be converted"
4. In R3 RPD and Others system when I check format its ok its show some others format which is support to be such as "ALI, OBJ, OTF, SCR, URL" ...
How may install these format in XI 3.0
Please Advice I will be really appriciated
Thanks a lot
Travis -
How to use a function module in a subroutine
Hi,
I am working on a report where i have to create list boxes for 5 fields.Instead of using the function module VRM_SET_VALUES for each field can i use subroutine?
If so, can anyone tell me the procedure for that?Its very urgent.
Thanks and Regards,
HemaHi,
I have written the code like this.
FORM VALUE USING V_NAME.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = v_name
values = v_list.
ENDFORM.
AT SELECTION-SCREEN OUTPUT.
REFRESH V_LIST.
v_name = 'P_COMMER'.
v_value-key = 'C'.
v_value-text = 'Commercial'.
APPEND v_value TO v_list.
v_value-key = 'N'.
v_value-text = 'Non-Commercial'.
APPEND v_value TO v_list.
v_value-key = ' ' .
v_value-text = 'Both'.
APPEND v_value to v_list.
PERFORM VALUE USING V_NAME.
REFRESH V_LIST1.
v_name1 = 'P_DIRECT'.
v_value1-key = 'D'.
v_value1-text = 'Direct'.
APPEND v_value1 to v_list1.
v_value1-key = 'I'.
v_value1-text = 'Indirect'.
APPEND v_value1 to v_list1.
PERFORM VALUE USING V_NAME1.
REFRESH V_LIST2.
v_name2 = 'P_DIR'.
v_value2-key = 'D'.
v_value2-text = 'D'.
APPEND v_value2 TO v_list2.
v_value2-key = 'C'.
v_value2-text = 'C'.
APPEND v_value2 TO v_list2.
v_value2-key = ' ' .
v_value2-text = ' '.
APPEND v_value2 to v_list2.
PERFORM VALUE USING V_NAME2.
REFRESH V_LIST3.
v_name3 = 'P_LOW'.
v_value3-key = 'Y'.
v_value3-text = 'Yes'.
APPEND v_value3 TO v_list3.
v_value3-key = 'N'.
v_value3-text = 'No'.
APPEND v_value3 TO v_list3.
v_value3-key = ' ' .
v_value3-text = ''.
APPEND v_value3 to v_list3.
PERFORM VALUE USING V_NAME3.
REFRESH V_LIST4.
v_name4 = 'P_PARENT'.
v_value4-key = 'P'.
v_value4-text = 'Parent'.
APPEND v_value4 TO v_list4.
v_value4-key = 'C'.
v_value4-text = 'Child'.
APPEND v_value4 TO v_list4.
v_value4-key = ' ' .
v_value4-text = ''.
APPEND v_value4 to v_list4.
PERFORM VALUE USING V_NAME4.
REFRESH V_LIST5.
v_name5 = 'P_PREF'.
v_value5-key = 'P'.
v_value5-text = 'Preferred'.
APPEND v_value5 TO v_list5.
v_value5-key = 'N'.
v_value5-text = 'NotPreferred'.
APPEND v_value5 TO v_list5.
v_value5-key = ' ' .
v_value5-text = ''.
APPEND v_value5 to v_list5.
PERFORM VALUE USING V_NAME5.
Now I am getting the same set of values in all the fields.How can I solve this?
Thanks and Regards,
Hema -
"CNTL_ERROR" raised , when using a Function Module
Hi All,
I am trying to reuse an existing Function module. This function module, fetches data in an internal table and creates a popup using ALV, using the Call Screen statement. I cannot modify this function module.
Is there any method, how I can use this Function Module in Web Dynpro Application(which would be executed from portal) , because if I use it directly, I get an error .. Exception condition " CNTL_ERROR" raised as the Custom Container object doesn't get created. As far as I understand, we cannot use such a function module directly, but please let me know if there Is any work around apart from creating a new function module.
Best Regards,
Preethi Santhanam.Refer these threads (Ans by Thomas) :
CNTL_ERROR while calling an FM through WebDynpro -
In scripts using ADDR_GET_NEXT_COMM_TYPE function module
hi,
in my program these two function modules are used to send email.
ADDR_GET_NEXT_COMM_TYPE
CONVERT_COMM_TYPE_DATA
i want to know in format the email will be ,
in otf or in pdf, where we can find it.
using this function module can we able to send e-mail for multiple receipts ?Try this sample code...
I guess it will help you..
Sample Code
Internal Table declarations
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
Work Area declarations
wa_objhead TYPE soli_tab,
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
wa_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,"To convert from 132 to 255
Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZZZ_TEST1'
importing
fm_name = v_form_name
exceptions
no_form = 1
no_function_module = 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.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
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.
i_otf[] = w_return-otfdata[].
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
Fehlerhandling
if sy-subrc <> 0.
endif.
loop at i_tline.
translate i_tline using '~'.
concatenate wa_buffer i_tline into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
Create Message Body
Title and Description
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
Attachment
(pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = '[email protected]'.
i_reclist-rec_type = 'U'.
append i_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
Regards,
SaiRam -
Use of Function Module IDOC_INPUT_CREDITOR
Hi All,
Could you please let me know the use of the function module IDOC_INPUT_CREDITOR. If i customise this function module by copying to Z_IDOC_INPUT_CREDITOR.. is it possible for me to post the vendor classification data by using the function module.
Thank You,
SureshHi,
This function module is used to post Vendor realted information through IDOCs. You can copy the same and can create your own but you need to attach this to your own IDOC message type or you can call through your own customized transaction.
-suresh Revuru -
Unalbe to delete lock entry table using Dequeue function module
Friends,
I display a base ALV list with custom app. tool bar. When i click on a button, i submit another report which updates a z-table for that corresponding row. I create a lock object for this entry before submitting the report. After updating the table, I try to delete the lock object using dequeue function module in the called report, but though the subrc is 0, the lock entry is not getting deleted in SM12. The called report, after dequeue, again submits report 1 (the caller). So, when i try to do some operation for the same row which I first selected, it triggers Foreign_lock exception. When I completely go out of the base list, only then the entry is deleted. Can anyone tell me the reason? I have tried with parameters _SCOPE & _SYNCHRON, but same result.
Regards,
Sathish RHi,
The triggering of the dequeue is not in the proper position as it need to be placed.
Thats the only problem as per u have described the issue.
Place the deque as soon as the report is return the value.
I hope it may work ur issue.
Maybe you are looking for
-
Time Out and slow performance of query
Hi Experts, We have a multiprovider giving sales and stock data.we have 1000 article 200 sites this query doesn't respond at all.It is either timed out or analyzer status is not responding. However on single article input ,the query responds in 60 se
-
Explain plan different for same query
Hi all, I have a query, which basically selects some columns from a remote database view. The query is as follows: select * from tab1@remotedb, tab2@remotedb where tab1.cash_id = tab2.id and tab1.date = '01-JAN-2003' and tab2.country_code = 'GB'; Now
-
[Solved] Missing gnome-shell stuff?
Hi First time arch linux user I installed gnome so far so good. But I seem to be missing all the nice new eyecandy panels, bars, search, etc. Any idea why that is and how I can make it appear? http://gnome3.org/img/search-big.png --> All not there an
-
my spfile had been corrupted and i dont have any pfile so tell me what to do now?? how can i startup the database now?? and tell me can opening a binary file using vi editor and performing some changes and saving them can corrupt an spfile?? i had ch
-
Expressions problems in remote debugging
Hi, I'm tying to remote debug my application. I added the following to the JVM arguments: "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 -Djava.compiler=NONE" I also reconfigured a remote debug configuration in the e