Call Function in CL_RSPLS_CR_EXIT_BASE to derive values
Dear all,
we want to derive the location from item (material). If item gebinns with "EMU" then location is 2. If item beginns with "X" then locations is "68" and so on.
To realise we chose characteristic relationship with derivation and based on "Exit Class".
we copied the Class "CL_RSPLS_CR_EXIT_BASE" to "Z_CL_RSPLS_CR_EXIT_BASE". Now we want to call a function method "IF_RSPLS_CR_METHODS~DERIVE" like:
implement your derivation algorithm here:
field-symbols: <l_chavl> type any.
assign component 'BW_LAGER' of structure c_s_chas to <l_chavl>.
CALL FUNCTION 'Z_ST_BW_LAGER'
The function look like:
FUNCTION Z_ST_BW_LAGER.
""Lokale Schnittstelle:
*" EXPORTING
*" REFERENCE(BW_LAGER) TYPE /BIC/OIBW_LAGER
lesen
But we did not know wich are the IMPORTING (like I_INFOPROV ?) parameters to fecht the values for the data. In BW-BPS we have UPC_Y_AREA, UPC_Y_VARIABLE, UPY_Y_CHANM and so on. Wich are the same in BI-integrated planning.
Regards,
Daniel Meyer
Dear all,
we use this code:
field-symbols: <l_chavl> type any.
DATA: LAGER(2).
assign component '/BIC/P_RMRESC' of structure c_s_chas to <l_chavl>.
IF <l_chavl>+0(3) = 'EMU'.
LAGER = '2'.
ELSEIF <l_chavl>+0(1) = 'O'.
LAGER = '1'.
ENDIF.
<l_s_buf>+2(15) = <l_chavl>.
assign component '/BIC/BW_LAGER' of structure c_s_chas to <l_chavl>.
<l_chavl> = LAGER.
<l_s_buf>+0(2) = <l_chavl>.
But now we have the problem, how to write ist back to the buffer? If we debugg it, we see in this code:
IF o_use_buffer = rs_c_true.
o_r_is_valid->* = l_is_valid.
IF o_r_is_valid->* = rs_c_true.
INSERT <l_s_buf> INTO TABLE <l_th_buf>.
c_s_chas = <l_s_buf>.
ELSE.
IF e_t_mesg IS SUPPLIED.
o_r_s_mesg->* = l_s_mesg.
APPEND l_s_mesg TO e_t_mesg.
ENDIF.
INSERT <l_s_buf> INTO TABLE <l_th_buf>.
RAISE EXCEPTION TYPE cx_rspls_failed
EXPORTING
msgid = l_s_mesg-msgid
msgty = l_s_mesg-msgty
msgno = l_s_mesg-msgno
msgv1 = l_s_mesg-msgv1
msgv2 = l_s_mesg-msgv2
msgv3 = l_s_mesg-msgv3
msgv4 = l_s_mesg-msgv4.
ENDIF.
ENDIF.
that o_r_is_valid->* has no value, so he goes to the ELSE-part.
Could anyone help?
Regards,
Daniel
Similar Messages
-
I am creating a Vi. I want to do a sub function. I want to connect a switch to a toggle flip flop so need to use a push button switch in the input but at the same time take its output to a true/false loop and execute it according to the ourput of the toggle flip flop which will have an ON and OFF state.
JerilIn the front panel you can r-click the top right icon and "Show Connector". Click which controls and indicator you want to be your interface. Then drag it to your main application and it'll work as a sub-vi. You can do this for all VI's. Just like the "+" VI takes two numbers (controls) and return one result (indicator).
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
Calling functions and inserting tables based on values entered
Hello Everyone,
I am creating a function as below:
create or replace function func(flags in number,Ctry in varchar2) return number
is
maxv number;
flagv number;
begin
flagv:=1;
select max(num) into maxv from A;
if flags =1 then
insert into A(num,nam) values(maxv+1,Upper(Ctry));
else
flagv:=0;
end if;
return flagv;
end;
The function takes two parameters-The first one will be either 0 or 1.The second one will be name of a country.
If the first parameter is 1 then we would insert the country name passed, to the table name A.If its 0 then no insertion occurs and the function would return a value 0.
On compiling the function I get a success!.
When I do a
SQL>select distinct func(0,'UK') from B;
it works well and returns 0
However when I do
SQL>select distinct func(1,'UK') from B;
I expect an output of 1 & also expect UK to be inserted as anew row in the table A.However It throws an error saying "ORA-14551: cannot perform a DML operation inside a query .."
It is very important for me to use select to call the function, as my application would fire a select with that function and based on the value entered would insert or not insert at the back end.
Is there any way out to do this??
variable temps number
exec :number :=func(1,'UK');
does work but I cant use this in my application.
Hope you can help! Thanks!create or replace function func(flags in number,Ctry in varchar2) return number
is
PRAGMA AUTONOMOUS_TRANSACTION;
maxv number;
flagv number;
begin
flagv:=1;
select max(num) into maxv from A;
if flags =1 then
insert into A(num,nam) values(maxv+1,Upper(Ctry));
COMMIT;
else
flagv:=0;
end if;
return flagv;
end;
Is the above changes in BOLD enough or I need to do something else too in order to incorporate the autonomous transaction??
I am not too familiar with autonomous transaction.Could you please suggest the changes I need if any more required??
Thanks a ton for your suggestions!
Message was edited by:
user579245
Message was edited by:
user579245 -
To get import value of table spoolids in CALL function 'smartfomr' ?
I am calling smartform as like under:
DATA:l_doc_output_info TYPE ssfcrespd,
tab_otf_data TYPE ssfcrescl,
l_job_output_options TYPE ssfcresop.
CALL FUNCTION FNAME
IMPORTING
DOCUMENT_OUTPUT_INFO = l_doc_output_info
JOB_OUTPUT_INFO = tab_otf_data
JOB_OUTPUT_OPTIONS = l_job_output_options
exporting..
changing..
i am run the smartform than i get display than i print it form that smartform output but i am getting null value in : tab_otf_data-spoolids and tab_otf_data-otfdata,
So, how to get that table values?
if u know,
regards,
I am gettin null value inHi Scruz !
The parameter "GETOTF" of the structure CONTROL_PARAMETERS should be set.
Regards,
Vincent. -
Populate SELECT-OPTIONS default value using CALL FUNCTION
Hi Experts,
I would like to populate SELECT-OPTIONS s_currm default with value in w_currm, however, it doesn't seem to work. Can you please advise what the correct syntax is.
Note that CALL FUNCTION 'GET_CURRENT_YEAR' is working correctly and populating w_currm (as I can use it in a SQL SELECT statement), however, it does not seem to work for SELECT-OPTIONS s_currm.
Thank you for your time.
Code snippet is as a follows:
REPORT Z_DOWNLOAD_BSIS_TEST.
*Data Declaration
DATA: w_currm TYPE BSIS-MONAT.
*Define current fiscal month
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = 'X999' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm. " Current Fiscal Month
SELECT-OPTIONS s_currm FOR w_currm
DEFAULT w_currm. " The default value is NOT being populated (appears blank)Hi Venkat.O,
Thank you for your clear response. I have implemented your suggestion and it works, however, I now have a new problem.
Each time the report is executed or the "multiple selection" button is clicked the selection fields are populated once again with the default (low) values.
For example, when report is first opened the s_curry field displays '2010'. Clicking "multiple selection" results in another '2010' being populated. After executing the report the selection screen is populated again with '2010' (so we now have '2010' listed 3 times in the s_curry field).
How do I prevent the default values from repeating?
REPORT Z_DOWNLOAD_BSIS_TEST
*Data Declaration
DATA: w_currm TYPE BSIS-MONAT,
w_curry TYPE BSIS-GJAHR,
w_prevm TYPE BSIS-MONAT,
w_prevy TYPE BSIS-GJAHR.
SELECTION-SCREEN BEGIN OF BLOCK b11 WITH FRAME TITLE text-001 .
*Parameters to enter the path
PARAMETERS: FILENAME(128) OBLIGATORY DEFAULT '/usr/sap/tmp/TEST.txt'
LOWER CASE.
SELECT-OPTIONS: s_curry FOR w_curry,
s_currm FOR w_currm.
SELECTION-SCREEN END OF BLOCK b11.
AT SELECTION-SCREEN OUTPUT.
*Define current/previous financial periods
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = 'X999' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
s_curry-low = w_curry.
s_curry-option = 'EQ'.
s_curry-sign = 'I'.
APPEND s_curry.
CLEAR s_curry.
s_currm-low = w_currm.
s_currm-option = 'EQ'.
s_currm-sign = 'I'.
APPEND s_currm.
CLEAR s_currm. -
How to get improt values in CALL function 'smartfomr name'?
i am calling smartform with fucntion module but i am getting 3 import parameter value null(i wnat regarding spool info, etc. from it) ,
i have already defined that 3 import parameters as llike in function module assosiated type.
where i am wrong , what should i have to do,
regards,I thin k you are calling function module directly - use this ,
Use FM SSF_FUNCTION_MODULE_NAME to find Smartform's FM.
formname = 'ZSMRTFORM'.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = formname
importing
fm_name = fm_name
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
exit.
endif.
then pass the value in
CALL FUNCTION fm_name
EXPORTING ....
IMPORTING
DOCUMENT_OUTPUT_INFO = l_doc_output_info
JOB_OUTPUT_INFO = tab_otf_data
JOB_OUTPUT_OPTIONS = l_job_output_options
TABLE .....
Regards,
Amit
Reward all helpful replies. -
How to pass string value to call function in BIIP FOX?
Dear all,
In BIIP fox , we can call function module.
I got a simple test FM like:
FUNCTION ZTESTBPSFM2.
""Local Interface:
*" IMPORTING
*" REFERENCE(I_X) TYPE STRING
*" REFERENCE(I_H) TYPE BSP_STRING
*" EXPORTING
*" REFERENCE(I_Y) TYPE F
ENDFUNCTION.
My FOX is like,
DATA YM TYPE 0CALMONTH.
DATA I_N TYPE F.
DATA J TYPE STRING.
J = 'KKKK'.
FOREACH YM.
CALL FUNCTION ZTESTBPSFM2
EXPORTING
I_X = J
IMPORTING
I_Y = I_N.
{ZREV , YM} = I_N.
ENDFOR.
When I run the function , I got a error .
"Types of parameter I_X (S) and variable J(C) are inconsistent "
Does anyone know which string data type I should use in function module?
Best Regards,
JeffHi Jeff
this is a bug. Please open a customer message so SAP support can correct the issue.
Regards,
Marc
SAP NetWeaver RIG -
Passing value as parameter to 'call function'
Hi,
CALL FUNCTION 'TH_POPUP'
EXPORTING
client = '100'
user = 'XXXXXX'
MESSAGE = 'Hello! u got END SESSION'
MESSAGE_LEN = 0
CUT_BLANKS = ' '
EXCEPTIONS
user_not_found = 1
OTHERS = 2.
The above program pops up a new window in another user system from a user system. xxxxx is that particular userID.
I want to enter the userID after executing and userID should be passed to call function 'TH_POPUP' and show the result.
I tried using 'PARAMETER' statement. It did not work.
Thanks,
vbsigate.Hi,
What i understand is you want to enter the user name on selection screen.
This is the program and it works fine.
(May be in your program the parameter was not defined correctly as type sy-uname).
report abc.
PARAMETERS : p_user type sy-uname obligatory.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = sy-mandt
USER = p_user
MESSAGE = 'Hello! u got END SESSION'
* MESSAGE_LEN = 0
* CUT_BLANKS = ' '
EXCEPTIONS
USER_NOT_FOUND = 1
OTHERS = 2
regards,
amit m. -
Derive values based upon user input
Hello,
I recieved a request for a report.
When a user runs the report they are to be prompted for a fiscal year/period.
Based on the fiscal year/period that the user provides I have the following columns (in bold below are 2 examples that may make the description more clear).
1. Revenue for the Fiscal year Prior to the fiscal year of the user input value
2. Revenue for the Fiscal year/Period prior to the input Fiscal year/period
3. Revenue for the Year to date accumulation up to the prior fiscal year/period that the user input
4. Revenue for the Year to date accumulation up to the prior fiscal year (fiscal year rolls back first) and prior period (for period 01, it then rolls back the fiscal year 1 more year) that the user input
Example 1: If the user ran the query and they provided the value 05/2007, then the values that need to be obtained would be:
1. Revenue for 2006
2. Revenue for 04/2007
3. Revenue for 01/2007 to 04/2007
4. Revenue for 01/2006 to 04/2006
Example 2: If the user ran the query and they provided the value 01/2008, then the values that need to be obtained would be:
1. Revenue for 2007
2. Revenue for 12/2007
3. Revenue for 01/2007 to 12/2007
4. Revenue for 01/2006 to 12/2006
Please help me with determining how to obtain the user input value, and then how to derive the time periods for the columns based upon that value.
Thanks,
Nick
(points available)
Edited by: Nick Bertz on Mar 13, 2008 9:43 AMHello,
See my example.. I am reading the value from Keydate Variable
WHEN ZVND01
READ TABLE i_t_var_range INTO w_var_range WITH KEY vnam = 'Keydate'.
IF SY-SUBRC = 0.
CLEAR l_s_range.
l_date = w_var_range-low.
concatenate l_date(6) '01' into l_first_date.
CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
EXPORTING
day_in = l_date
IMPORTING
last_day_of_month = l_last_date
EXCEPTIONS
day_in_not_valid = 1
OTHERS = 2.
IF sy-subrc EQ 0.
l_s_range-low = l_first_date.
l_s_range-high = l_last_date.
l_s_range-sign = k_sign_inclusive.
l_s_range-opt = k_option_between.
APPEND l_s_range TO e_t_range.
ENDIF.
Hope this example helps.. -
Call Function Module within an Extractor
Hello Experts.
We have a requirement where a function module needs to be called from within an extractor to retrieve the data. The function module exists in the HR box. What would be the steps to follow? We can't create a generic data source based on the function module in the HR box. Do I create the extractor in BW?
Appreciate your help.
Thanks!Since the FM on the HR box is remote-enabled, as you've stated, then any SAP application (e.g. BW, R3/ECC, et. al.) that has an RFC connection to that HR box can execute that FM.
Executing a remote-enabled FM is exactly like executing any FM, with one exception. Like any FM, you pass a set of values or internal tables to the FM, through the EXPORTING or TABLES section of the FM, and receive back a set of values or internal tables from the FM, through the IMPORTING or TABLES section of the FM. The exception is that you will have one additional parameter to pass, namely DESTINATION. So, the call to the FM would look something like this:
CALL FUNCTION
'ZREMOTE_FM'
DESTINATION
l_dest "This is the environment where the FM sits - e.g. HRP100 or similar)
EXPORTING
logical_system = l_logical "This is the calling environment - e.g. BWP100)
ifield1 = l_ifield1
ifield2 = l_ifield2
IMPORTING
efield1 = l_efield1
efield2 = l_efield2
TABLES
t_itab1 = t_itab1
t_itab2 = t_itab2
EXCEPTIONS
NO_DATA_FOUND = 1.
You can code it so that l_dest is derived based on the value in l_logical. The values to be populated in l_dest and l_logical, however, are dependent on how your Basis team names the RFC connections. This assumes your landscape for HR is HRD100, HRQ100 and HRP100 for the development, quality and production, respectively and BWD100, BWQ100 and BWP100 for the BW landscape:
CONCATENATE: sy-sysid sy-mandt INTO l_logical.
CASE l_logical.
WHEN 'BWD100'.
l_dest = 'HRD100'.
WHEN 'BWQ100'.
l_dest = 'HRQ100'.
WHEN 'BWP100'.
l_dest = 'HRP100'.
WHEN OTHERS.
ENDCASE. -
Call function POPUP_TO_CONFIRM after Excel close
Good morning
I have written code like this
DATA: EXCEL TYPE OLE2_OBJECT.
DATA: BOOKS TYPE OLE2_OBJECT.
DATA: BOOK TYPE OLE2_OBJECT.
DATA: CELL TYPE OLE2_OBJECT.
DATA: FONT TYPE OLE2_OBJECT.
DATA: FILE TYPE OLE2_OBJECT.
CREATE OBJECT EXCEL 'EXCEL.APPLICATION'.
CALL METHOD OF EXCEL 'WORKBOOKS' = FILE.
CALL METHOD OF FILE 'OPEN'
EXPORTING
#1 = 'C:temp8D.xls'
#2 = 1.
CALL METHOD OF EXCEL 'CELLS' = CELL
EXPORTING
#1 = 6
#2 = 'C'.
SET PROPERTY OF CELL 'VALUE' = zak_pomoc.
CALL METHOD OF EXCEL 'QUIT'.
FREE OBJECT EXCEL.
If user has modified the 8D file I want display this file on the screen, but first function POPUP_TO_CONFIRM should ask him if he really wants to show file.
I make it like this.
call function 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Display report'
TEXT_QUESTION = 'Display report 8D?'
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
START_COLUMN = 25
START_ROW = 6
IMPORTING
answer = ans.
if ans eq '1'.
DATA gs_excel TYPE ole2_object .
DATA gs_wbooks TYPE ole2_object .
DATA gs_wbook TYPE ole2_object .
DATA gs_application TYPE ole2_object .
CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
SET PROPERTY OF gs_excel 'Visible' = 1 .
GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
GET PROPERTY OF gs_wbooks 'Application' = gs_application .
*--Opening the existing document
CALL METHOD OF gs_wbooks 'Open' = gs_wbook
EXPORTING
#1 = 'c:temp8D.xls'.
endif.
But there is my problem because two windows: first- asking about saving the file and the second- asking about showing the file, pop up in this same time.
What condition should I write to call second window after this first one?
Please, any suggestions?
Thank you.Hello
I'm just beginner and there is one thing I don't understand. Between lines
CALL METHOD OF EXCEL 'QUIT'
and
FREE OBJECT EXCEL
the window 'Do you want save changes' appears. And in that moment what is the value that says if the user chooses OK or QUIT?
If I would know that value, I could call function POPUP_TO_CONFIRM in the right moment. -
Function Module to Read attributes value from Classification tab
Dear Experts ,
We are using material classification in the material master. Under classification tab of material master , we are maintaining certain characteristics and their corresponding values.
I want to read those values and use those in one of the report.
Can you please help me in identifying Function Module which will return the values of all the attributes of that material.
Thanks in advnce,
Regards,
NikhilYou can check those details using CT06 transaction.
FM CLAF_CLASSIFICATION_OF_OBJECTS can be used to retrive the data using program.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
class = gc_class
classtext = 'X'
classtype = gc_classtype
clint = gc_mmpsk
features = 'X'
language = sy-langu
object = l_object
key_date = sy-datum
initial_charact = 'X'
change_service_clf = ' '
inherited_char = 'X'
TABLES
t_class = lt_class
t_objectdata = lt_objectdata
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4. -
Function module to convert character value of month into numeric value?
Hi Experts,
I need to convert a character value of a month in three alphabets to its numeric value.
e.g. 'jun' should be converted into '06' and 'jan' into '01' using a function module.Can anybody please provide me a similar function module?
TIA
Abhishektry this code:
DATA: text(20) TYPE c,
date TYPE sy-datum.
text = '06. Jul 06'.
TRANSLATE text TO UPPER CASE.
TRANSLATE text USING '. '.
CONDENSE text NO-GAPS.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_INPUT'
EXPORTING
input = text
IMPORTING
output = date.
WRITE date USING EDIT MASK '__.__.____'.
Regards,
Dara. -
Hi. i used Function module to change Characteristic values of a sales order
hi. i used Function module to change Characteristic values of a sales order..
but sales order's Characteristic values didn't change.
And the Function module doesn't occur any log message.
please tell me wrong code, and how to solve this problem.
if i have wrong method, what data can i pass to change the characteristic values
DATA: LT_E1CUVAL TYPE TABLE OF E1CUVAL.
DATA: WA_E1CUVAL TYPE E1CUVAL.
DATA: LS_CFG_HEAD LIKE CUXT_CUCFG_S,
LS_INSTANCES LIKE CUXT_CUINS_S,
LS_VALUES LIKE CUXT_CUVAL_S,
LS_E1CUCFG LIKE E1CUCFG,
LS_E1CUINS LIKE E1CUINS,
LS_E1CUVAL LIKE E1CUVAL,
LS_PROFILE LIKE E1CUCOM,
LS_VBAP LIKE VBAP,
L_CUOBJ LIKE INOB-CUOBJ,
L_ATINN LIKE CABN-ATINN.
DATA: LT_INSTANCES LIKE CUXT_CUINS_S OCCURS 0,
LT_PART_OF LIKE CUXT_CUPRT_S OCCURS 0,
LT_VALUES LIKE CUXT_CUVAL_S OCCURS 0,
LT_VAR_KEYS LIKE CUXT_CUVK_S OCCURS 0,
LT_KSML LIKE KSML OCCURS 0 WITH HEADER LINE,
BEGIN OF LT_CLINT OCCURS 0,
CLINT LIKE KSSK-CLINT,
END OF LT_CLINT.
DATA: LT_CUIB LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
DATA: E_ROOT_INSTANCE TYPE CUXT_INSTANCE_NO.
DATA: EV_ROOT_PERSIST_ID TYPE IBEXTINST_DATA-EXT_INST_ID.
DATA: EV_CFG_HAS_CHANGED TYPE XFELD.
DATA: EV_HANDLE_APPL_LOG TYPE BALLOGHNDL.
DATA: L_CUOBJ_NEW TYPE CUOBJ.
DATA: L_OWNER TYPE IBXX_BUSINESS_OBJECT.
REFRESH LT_E1CUVAL.
CLEAR LS_VBAP.
SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
FROM VBAP WHERE VBELN = I_VBELN
AND POSNR = I_POSNR.
IF SY-SUBRC <> 0.
RAISE INSTANCE_NOT_FOUND.
ENDIF.
REFRESH LT_CUIB. CLEAR LT_CUIB.
LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
APPEND LT_CUIB.
CALL FUNCTION 'CUCB_INITIALIZER'
EXPORTING
IT_INSTANCES = LT_CUIB[].
CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
EXPORTING
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
IMPORTING
E_CFG_HEAD = LS_CFG_HEAD
ES_PROFILE = LS_PROFILE
ET_RETURN = ET_RETURN
TABLES
E_TAB_INSTANCES = LT_INSTANCES
E_TAB_PART_OF = LT_PART_OF
E_TAB_VALUES = LT_VALUES
E_TAB_VAR_KEYS = LT_VAR_KEYS
EXCEPTIONS
INVALID_INSTANCE = 1
NO_ROOT_INSTANCE = 2
INSTANCE_IS_A_CLASSIFICATION = 3
INTERNAL_ERROR = 4
NO_PROFILE_FOUND = 5
INVALID_DATA = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE INSTANCE_NOT_FOUND.
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ELSE.
LOOP AT LT_VALUES INTO LS_VALUES.
IF LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
LS_VALUES-VALUE = '7100010'. "This is test data
MODIFY LT_VALUES FROM LS_VALUES.
ELSE.
DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
ENDIF.
CLEAR LS_VALUES.
ENDLOOP.
ENDIF.
영업정보 특성 변경
CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
EXPORTING
I_CFG_HEADER = LS_CFG_HEAD
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
I_PLANT =
I_STRUCTURE_EXPLOSION_DATE =
I_STRUCTURE_EXPLOSION_APPL_ID =
I_LOGSYS =
IS_PROFILE = LS_PROFILE
IV_ONLY_SINGLE_LEVEL =
IV_HANDLE_APPL_LOG =
IV_OBJECT_APPL_LOG = 'CIF'
IV_SUBOBJECT_APPL_LOG = 'T_CNFG'
IMPORTING
E_ROOT_INSTANCE = E_ROOT_INSTANCE
EV_ROOT_PERSIST_ID = EV_ROOT_PERSIST_ID
EV_CFG_HAS_CHANGED = EV_CFG_HAS_CHANGED
EV_HANDLE_APPL_LOG = EV_HANDLE_APPL_LOG
ET_RETURN = ET_RETURN
TABLES
I_TAB_INSTANCES = LT_INSTANCES
I_TAB_PART_OF = LT_PART_OF
I_TAB_VALUES = LT_VALUES
I_TAB_VAR_KEYS = LT_VAR_KEYS
I_TAB_BLOB =
EXCEPTIONS
NO_CONFIGURATION_DATA = 1
NO_ROOT_INSTANCE = 2
INVALID_INSTANCE = 3
INSTANCE_IS_A_CLASSIFICATION = 4
INTERNAL_ERROR = 5
NO_PROFILE_FOUND = 6
INVALID_DATA = 7
OTHERS = 8
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE NO_CONFIGURATION_DATA.
WHEN 3.
RAISE NO_ROOT_INSTANCE.
WHEN 3.
RAISE INVALID_INSTANCE .
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN 3.
RAISE INTERNAL_ERROR.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ENDIF.
COMMIT WORK.
save configuration with next commit
CLEAR: LS_INSTANCES.
READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
L_OWNER-OBJECT_KEY = LS_INSTANCES-OBJ_KEY.
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
EXPORTING
ROOT_INSTANCE = LS_VBAP-CUOBJ
ROOT_OBJECT = L_OWNER
IMPORTING
NEW_INSTANCE = L_CUOBJ_NEW
EXCEPTIONS
INVALID_INSTANCE = 1
INVALID_ROOT_INSTANCE = 2
NO_CHANGES = 3
OTHERS = 4.
IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
CLEAR LS_VBAP-CUOBJ.
RAISE INTERNAL_ERROR.
ELSEIF SY-SUBRC = 1.
LS_VBAP-CUOBJ = L_CUOBJ_NEW.
ENDIF.
What's wrong?
help me to solve this problem.
Thanks a lot.<b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
<b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
<b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
<b>SD_PARTNER_READ</b> all the partners information and addresses
<b>SD_DETERMINE_CONTRACT_TYPE</b>
In: at least VBAK-VBELN
Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
<b>SD_SALES_DOCUMENT_COPY</b>
<b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW Data collection for printing
called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
regards
vinod -
Call function in abap routine of infopackage
Experts,
Good day. I have a problem concerning the data to be imported in my ods.I can't find a similar thread corcerning my problem. My File date field should contain only 2 years and 3months data of recent data. I'm using a call function fima_date_create to filter values of zfile_date.
CALL FUNCTION 'FIMA_DATE_CREATE'
EXPORTING
I_DATE = sy-datum
I_FLG_END_OF_MONTH = ' '
I_YEARS = 2-
I_MONTHS = 3-
I_DAYS = 0
I_CALENDAR_DAYS = 0
I_SET_LAST_DAY_OF_MONTH = ' '
IMPORTING
E_DATE =
E_FLG_END_OF_MONTH =
E_DAYS_OF_I_DATE =
The sy-datum becomes the High value and the date generated by this FM will be the low value. I already tested this function module and it is what i want. How Should I write the ABAP code for this in the abap routine for my infopackage? Or what steps do I need to take.Hi,
When you choose the option to write a routine for one of the characteristics in the infopackage selections, you get a window to write your code with some prewritten code as below. Modify it as shown below, for your requirement.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'CALDAY'.
l_idx = sy-tabix.
START of YOUR CODE
<----
Required logic -
>
L_T_RANGE-LOW = <lower limit of range>.
L_T_RANGE-HIGH = <upper limit of range>.
L_T_RANGE-SIGN = 'I'.
L_T_RANGE-OPTION = 'BT'.
END of YOUR CODE
modify l_t_range index l_idx.
p_subrc = 0.
Hope this helps.
Maybe you are looking for
-
Thinking about upgrading my plan..
I currently have the 50/50 plan with the actiontec MI424WR Rev I router. I'm a pretty avid gamer and frequently watch streams as well. That being said, the only things on my router using any kind of real bandwidth are my xbox and my computer. The
-
HT4910 how do i sync notes from Outlook with icloud?
Hi. Just migrated over from a Blackberry, and need to sync my iPhone 4s with Outlook 2010. I can sync the Contacts and Calender, albeit only in the iCloud, but although Notes shows up on the phone under settings, in iCloud and Outlook is does not syn
-
Cascade lov in a "form with a report"
I am fairly new to HTMLDB and struggling with this one. Can anyone help? I have built a test application that uses a form with report, created using the wizard.On the form I have cascaded LOVs( SITEOWNER and SITE) . The second LOV should depend on th
-
Need info about showtree tags FeedURL & DownloadURL
We use showtree and see two tags we had some questions about... FeedURL What is this used for? We couldn't find documentation and it isn't used globally with every podcast on our iTunes U site. <LinkCollectionSet> <LinkCollection> <Name>Links</Name>
-
Books of business - supported via web services
Are books of business supported in R15 via web services interface? If we create a new Contact, Account or Opportunity, can we associate it to a specific book? I can't find any documentation on this subject. If not, what's the point of using this func