Billing type in BAPI_SALESORDER_CREATEFROMDAT2 function Module
Hi,
Am creating sales orders through my program using the Function Module "BAPI_SALESORDER_CREATEFROMDAT2".
I have data(fields) for which i have to create a Sales orders.
I have mapped all the fields to the structures in the FM except Billing Type, I couldn't find where to map this "billing type" field in the Function Module.
I want to know into which structure's field in the above FM should this Billing type to be mapped.
Thanks,
Adithya M.
Why do you need to pass the Billing Type when you are creating the Sales Order? Only Sales order type is required in the sales order creation.
Based on the configuration maintained in the sales order, if future, system will create the specific type of delivery and Specific type of Billing document.
Regards,
Naimesh Patel
Similar Messages
-
Table with type ANY in function module
Hi all
I want to use a function module in different programs. I want to pass always a table and in a string the name of the structure, so that I can access the data with ASSIGN and the passed structure name.
For a structure I can use the type ANY, but if I want to use a table in a function module, I need to define a table type.
Is there a way to define a tabletype with the type ANY? A Workaround would be fine too.
Thanks and best regards!
ChristianHi Christian,
ANY TABLE is used to type a parameter, or field symbol, that can be a table of any type or structure.
ANY is used to type a parameter, or field symbol, that can be any type. You can't, however, use any table operations on a parameter/field-symbol typed as ANY. For that, you have to use ANY TABLE.
The same applies to ANY. You can pass to the method a data object, without specifying its type (i.e, in dynamic programs).
Suppose that I need to split a line into a table, but I don't know the structure of this line:
I have a method:
codeMETHOD split_line_in_table IMPORTING im_line TYPE ANY
EXPORTING ex_table TYPE ANY TABLE.
[/code]
codeMETHOD split_line_in_table.
SPLIT im_line AT separator INTO TABLE ex_table.
ENDMETHOD.[/code]
Now, i can pass this method a line of ANY structure and get a table without specifying its structure.
cheers,
Hema. -
Type conflict in function module parameters
Hi All,
i hve to pass dynamic field <dyn_field> into function module parameters but it's giving a dump for type conflict.
where VALUE2 data type in 'AUTHORITY_CHECK' is UST12-VON but if i define <dyn_field> type UST12-VON . then it'll give dump in *ASSIGN COMPONENT SECURITY_TABLE-FIELDNAME of structure <wa> to <dyn_field> *.
SECURITY_TABLE-FIELDNAME data type is different with UST12-VON .
pls guide me how to pass *<dyn_field> in fm parameters.
FIELD-SYMBOLS: <dyn_field> type any.
LOOP AT <DYN_TABLE_IN> INTO <WA>.
ASSIGN COMPONENT SECURITY_TABLE-FIELDNAME of structure
<wa> to <dyn_field> .
CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
USER = QUSER
OBJECT = SECURITY_TABLE-AUTHOBJCT
FIELD1 = 'ACTVT'
VALUE1 = '03'
FIELD2 = SECURITY_TABLE-FIELDNAME
VALUE2 = <dyn_field>Hi anuj ,,
Can you explauin the solution ..
Regards -
Processing Idoc type DELVRY05 whith function module IDOC_OUTPUT_DESADV01
Hi experts,
I want to send automatically an IDOC type DELVRY05 while saving the outbound delivery. i set the output message for shippement and the Outbound EDI parameters for the ship to party.
When I'm processing the output message in VL02N, i'm having the following message:
<<IDoc type DELVRY05 cannot be processed by IDOC_OUTPUT_DESADV01
Message no. E0029
Diagnosis
IDoc processing has been started for IDoc type DELVRY05. The selected process is of type and called IDOC_OUTPUT_DESADV01.
The selected process does not support processing of IDoc type DELVRY05.
>>
Is there any function module that i can use in order to process an IDoc type DELVRY05?
thanks for your help.
regards,
HermannHi Mohanaselvan
thanks very much, It's now working !
regards
Hermann -
Trigger Idoc by using the Output type in Z function module
My requirement is when I run Z function module then Idoc should be send which is configured in Output Type.
Means when ever i run the Functional module that Output type should be triggered.?
Does any one have solution??Hi,
Remove the Material Class from Importing Tab and Place the same under Tables Parameter.
Regards,
SRinivas -
Table parameter Types for this Function module
I am using K_HIERARCHY_TABLES_READ to get the profit centers for a given profit center group.
I have the following declarations for the parameters of this FM:
TYPE-POOLS: gseth.
Declarations for Profit Center Group
DATA: g_pcgrp TYPE rgsbs-class,
g_setid TYPE rgsbs-setnr,
g_info TYPE grphinfo,
g_overwrite TYPE sy-datar.
DATA:
i_nodes TYPE STANDARD TABLE OF gseth_node_tab,
i_values TYPE STANDARD TABLE OF gseth_val_tab,
i_masterdata TYPE STANDARD TABLE OF grpmdline.
When this is run, its taking me into a dump and it says:
The reason for the exception is:
The system tried to pass internal table "I_NODES" to the formal
parameter "T_NODES", but a type conflict occurred between the
formal and the actual parameter.
Pl help me to correct this dump and error.
Thanks
KiranDATA:
i_nodes TYPE STANDARD TABLE OF gseth_node_tab,
i_values TYPE STANDARD TABLE OF gseth_val_tab,
i_masterdata TYPE STANDARD TABLE OF grpmdline.
change your declarations
to the below...
DATA:
i_nodes TYPE gseth_node_tab,
i_values TYPE gseth_val_tab,
i_masterdata TYPE STANDARD TABLE OF grpmdline. -
How to connect our outbound function module to the message type
how to connect our outbound function module to the message type any transcation code exits to assign the message type with the function module .
Thank in advance .
A. ThiruHi Thiru,
Standard Transaction Codes, have their own Function Modules for generating Outbound/Indbound Idocs. Where these Function Modules will be configured to a particular Process Codes.
For E.g for PO's
Process code : ME10 - IDOC_OUTPUT_ORDERS - for creation
In case if its a Z Function Module, It depends on the case how you use IDOC types. either directly through Z Program or through Inbound/Outbound Process codes with respective Function modules.
Regards,
Anbalagan -
Hello,
I would like to find the IDOC types available by function module. For example, all idoc types for Production Planning module. Is there an easy way to get that info?
ThanksHi,
Go to Repository Browser (SE80) -> select Appliction Hierarchy and filter it down by Function Modules. you can now go to individual functional area (SD, MM , PP, etc) and drill down EDI objects hierarchy. You can very well judge the IDOC types based on IDOC Processing function modules.
Hope this will help...
regards,
PB -
Function module (Z_USR_INSTANT_CREATION1)
Hi Experts,
Please look into below coding and solve my problem.
FUNCTION Z_USR_INSTANT_CREATION1.
""Local Interface:
*" IMPORTING
*" VALUE(USERNAME1) LIKE BAPIBNAME-BAPIBNAME
*" VALUE(ACCTNO) TYPE /BIC/OIZCUSTOMER
*" VALUE(LOGONDATA1) LIKE BAPILOGOND STRUCTURE BAPILOGOND
*" VALUE(PASSWORD1) LIKE BAPIPWD STRUCTURE BAPIPWD DEFAULT
*" 'initpass'
*" VALUE(FIRSTNAME) TYPE /BI0/OINAME
*" VALUE(LASTNAME) TYPE /BI0/OINAME3
*" VALUE(ADDRESS1) LIKE BAPIADDR3 STRUCTURE BAPIADDR3 OPTIONAL
*" VALUE(REF_USER1) LIKE BAPIREFUS STRUCTURE BAPIREFUS OPTIONAL
*" VALUE(IP_V) TYPE RSINFOPROV DEFAULT 'ZEX_DS01'
*" VALUE(IP_H) TYPE RSINFOPROV DEFAULT 'ZEX_DS02'
*" EXPORTING
*" VALUE(CREATERRCODE) TYPE RSRCHANGEFLAG
*" VALUE(ROLERRCODE) TYPE RSRCHANGEFLAG
*" TABLES
*" RETURN1 STRUCTURE BAPIRET2
*" PROFILES1 STRUCTURE BAPIPROF
*" RETURN2 STRUCTURE BAPIRET2
*" RETURN3 STRUCTURE BAPIRET2
*" RETURN4 STRUCTURE BAPIRET2
DATA: NEWS(40), pwd(8).
data : ZACTGRP like BAPIAGR occurs 0 with header line.
Check if the user already exists.
CALL FUNCTION 'BAPI_USER_EXISTENCE_CHECK'
EXPORTING
username = USERNAME1
IMPORTING
return = RETURN1.
WRITE: RETURN1-type, RETURN1-MESSAGE.
IF sy-subrc EQ 0.
Call Function module to create UserId
*ADDRESS1-FIRSTNAME = 'Sreeni'.
*ADDRESS1-LASTNAME = 'Varadha'.
ADDRESS1-FIRSTNAME = FIRSTNAME.
ADDRESS1-LASTNAME = LASTNAME.
WRITE: /1 '*** FIRST AND LASTNAME PASSED BY JAVA: ', ADDRESS1-FIRSTNAME, ADDRESS1-LASTNAME.
CALL FUNCTION 'BAPI_USER_CREATE1'
EXPORTING
USERNAME = USERNAME1
LOGONDATA = LOGONDATA1
PASSWORD = PASSWORD1
ADDRESS = ADDRESS1
REF_USER = REF_USER1
TABLES
RETURN = RETURN2.
*CREATE FAILURE ERROR TYPE IS SENT BACK TO PORTAL
CREATERRCODE = RETURN2-TYPE.
Call Function module to Deactivate Password
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
USERNAME = USERNAME1
LOGONDATA = LOGONDATA1
ADDRESS = ADDRESS1
REF_USER = REF_USER1
TABLES
RETURN = RETURN3.
WRITE: RETURN2-MESSAGE, CREATERRCODE.
WRITE: RETURN3-MESSAGE.
ELSE.
User already Exists need to direct send back the return code to java.
WRITE: RETURN1-MESSAGE.
CREATERRCODE = RETURN2-TYPE.
ENDIF.
clear: zactgrp.
refresh zactgrp.
zactgrp-agr_name = 'ZPMUSA_STORE_USER'.
Zactgrp-from_dat = sy-datum.
zactgrp-to_dat = '99991231'.
append zactgrp.
Call function module to assign role to the User Id
CALL FUNCTION 'BAPI_USER_ACTGROUPS_ASSIGN'
EXPORTING
USERNAME = USERNAME1
TABLES
ACTIVITYGROUPS = zactgrp
RETURN = RETURN4.
*ROLE ASSIGN FAILURE ERROR TYPE IS SENT BACK TO PORTAL
ROLERRCODE = RETURN4-TYPE.
WRITE: ROLERRCODE.
Code to Insert records into ZSTAODS
DATA: ZSTAODS_ITAB LIKE /BIC/AZSTAODS00 OCCURS 0 WITH HEADER LINE.
ZSTAODS_ITAB-TCTUSERNM = USERNAME1.
ZSTAODS_ITAB-TCTADTO = '99991231'.
ZSTAODS_ITAB-TCTIOBJNM = 'ZCUSTOMER'.
ZSTAODS_ITAB-TCTSIGN = 'I'.
ZSTAODS_ITAB-TCTOPTION = 'EQ'.
ZSTAODS_ITAB-TCTLOW = ACCTNO.
ZSTAODS_ITAB-TCTHIGH = ACCTNO.
ZSTAODS_ITAB-TCTOBJVERS = 'A'.
ZSTAODS_ITAB-TCTADFROM = SY-DATUM.
APPEND ZSTAODS_ITAB.
MODIFY /BIC/AZSTAODS00 FROM TABLE ZSTAODS_ITAB.
clear: ZSTAODS_ITAB.
Code to Delete records from ZEX_DS01 & ZEX_DS02*
DELETE FROM /BIC/AZEX_DS0100.
DELETE FROM /BIC/AZEX_DS0200.
Code to Insert records into ZEX_DS01*
DATA: ZEX_DS01_ITAB LIKE /BIC/AZEX_DS0100 OCCURS 0 WITH HEADER LINE.
ZEX_DS01_ITAB-TCTUSERNM = USERNAME1.
ZEX_DS01_ITAB-TCTADTO = '99991231'.
ZEX_DS01_ITAB-TCTIOBJNM = 'ZCUSTOMER'.
ZEX_DS01_ITAB-TCTSIGN = 'I'.
ZEX_DS01_ITAB-TCTOPTION = 'EQ'.
ZEX_DS01_ITAB-TCTLOW = ACCTNO.
ZEX_DS01_ITAB-TCTHIGH = ACCTNO.
ZEX_DS01_ITAB-TCTOBJVERS = 'A'.
ZEX_DS01_ITAB-TCTADFROM = SY-DATUM.
APPEND ZEX_DS01_ITAB.
MODIFY /BIC/AZEX_DS0100 FROM TABLE ZEX_DS01_ITAB.
clear: ZEX_DS01_ITAB.
Code to Insert records into ZEX_DS02*
DATA: ZEX_DS02_ITAB LIKE /BIC/AZEX_DS0200 OCCURS 0 WITH HEADER LINE.
ZEX_DS02_ITAB-TCTUSERNM = USERNAME1.
ZEX_DS02_ITAB-TCTADTO = '99991231'.
ZEX_DS02_ITAB-TCTIOBJNM = 'ZCUSTOMER'.
ZEX_DS02_ITAB-TCTHIENM = 'RETAIL HIERARCHY'.
ZEX_DS02_ITAB-TCTHIEVERS = 'A'.
ZEX_DS02_ITAB-TCTHIEDATE = '99991231'.
ZEX_DS02_ITAB-TCTNIOBJNM = 'ZCUSTOMER'.
ZEX_DS02_ITAB-TCTATYPE = '1'.
ZEX_DS02_ITAB-TCTACOMPM = '1'.
ZEX_DS02_ITAB-TCTTLEVEL = '99'.
ZEX_DS02_ITAB-TCTNODE = ACCTNO.
ZEX_DS02_ITAB-TCTOBJVERS = 'A'.
ZEX_DS02_ITAB-TCTADFROM = SY-DATUM.
APPEND ZEX_DS02_ITAB.
MODIFY /BIC/AZEX_DS0200 FROM TABLE ZEX_DS02_ITAB.
clear: ZEX_DS02_ITAB.
Code of RSSM_GENERATE_AUTHORIZATIONS to generate profile from ZEX_DS01 & ZEX_DS02
TYPE-POOLS: rs.
*TABLES: tobj.
DATA: l_t_object TYPE rso_t_tlogo,
l_s_object TYPE rso_s_tlogo.
input parameters
initialize
DATA: l_display_log TYPE rs_bool.
IF sy-batch IS INITIAL.
l_display_log = rs_c_true.
ELSE.
l_display_log = rs_c_false.
ENDIF.
DATA: l_t_infoprov_auth TYPE rssbr_t_infoprov_auth,
l_s_infoprov_auth TYPE rssbr_s_infoprov_auth.
l_s_infoprov_auth-value = ip_v.
l_s_infoprov_auth-hierarchy = ip_h.
INSERT l_s_infoprov_auth INTO TABLE l_t_infoprov_auth.
call the function module
CALL FUNCTION 'RSSB_AUTH_GEN_FROM_INFOPROV'
EXPORTING
i_t_infoprov_auth = l_t_infoprov_auth
i_appl_log_initialized = rs_c_false
i_display_log = l_display_log
i_detlevel = '1'
i_packagesize = 10000.
*PROFILE GENERATION FAILURE ERROR TYPE IS SENT BACK TO PORTAL
PROFERRCODE = RETURN5-TYPE.
ENDFUNCTION.
Use of above function module:
This function module is used to create user ID in the system. It checks whether the user exists already, if yes, then it would send back the message for the same. If it doesnu2019t then it would create the user in system. Assign roles, profiles and authorizations for the user.
For ex: If we have 2 users XXX and YYY in that XXX is existing user and YYY is new user, letu2019s see how this function module will work for these two users
First, it uses BAPI_USER_EXISTENCE_CHECK function module to check whether the ID exists. If it exists(XXX), it would send back the message for the same. If not(YYY), it would go ahead to create the user id by the function module BAPI_USER_CREATE1. After creation of the id, message regarding the same would be sent at the end of execution of function module.
Next it will go for assigning of the roles, generation of profile and authorization to the user ID. Once the function module is finished, it would send out the message for the execution of all functionalities in the output screen.
My Requirement:
what about the internal and DUA (Delegated User Administrator) users is that covered with this function module? if not what changes required to function module?
Many thanks in advance
David
Edited by: david Rathod on Sep 24, 2010 10:11 AMHello David,
your question is really unreadable. Kindly format your question and resend.
Regards,
Satyam -
JDBC to IDoc (Custom inbound function module)
Hi,
In my scenario JDBC to IDoc, I am using a custom function module to change the planned order. When I exectue the function module in WE19, it works fine and the IDoc status is also updated correctly.
But when I execute the entire interface right from JDBC, the status of the IDoc is set to 51 and the description it is giving is "No status record was passed to ALE by the application".
Can any one help me with this, where exactly is the error?For IDOC status 51 : Inbound IDOC
In WE19, Give the IDOC number & execute ... then put the cursor on the idoc control record . then click on the Standard Inbound push button on the application tool bar.it will show show all the details like partner no,type , message type , process code & function module name ...
now put a break point in the function module .. & debug .
if u r using customised inbound function module , then click on inbound function module .. there u will get a pop screen with FM name & debugging option in both background & foreground mode... -
Get Import Parameters of a Function Module
Hi,
Is there a way to find the import parameters and their Data Type of a Function Module in any Table??
For example, i know i can find the name and the include of the Funtion Module in TFDIR. Is there anywhere i can find the list of Import Parameters and their Data Types??
Thanks and Regards,
Kaeyuryou can use
Data: lv_type type c.
clear:lv_type.
DESCRIBE FIELD p_bukrs TYPE lv_type.
It will return C as its type C and p_bukrs is selection screen parameter.
hope this helps. -
Dynamic programming: send data to function module, mapping...
Hello abappers,
I have a requirement to be able to send a the name of a table and a table-field to a function module, it can be a table of any type, so the function module should be generic in nature, the function module receives the table name and table-field name and then selects data for the field specified from the table specified (in the import parameter of the FM). Within the function module, I want to be able to determine the fields type? and then send this field to an internal table representing a a destination table (also specified in the import parameters).
the idea is to be able to map a field from any table to a specified field in another table, the table(source and destination) and field names will only determined at run time as specified by the user.
any assistance will be appreciated, I am not very familiar with dynamic\generic programming.Hello Bijo,
Following are the steps to implement this requirement:
1. Create import parameter for table name i.e. TABLE_NAME
2. Create tables parameter for fields table
3. Define table. DATA TABLE TYPE REF TO DATA. Also create single column internal table for fields and load all fields to select from database.
Inside function module you can implement following steps:
4. Load all the fields name into internal table. for this you can use DD03L for field details and use TABLE_NAME as key.
5. Once you have all the fields ready in internal table then construct fieldcatlog using these fields
loop at internal table with all the fields.
move it to field catalog.
append field catalog.
endloop.
6. Pass this field catalog table to static method create_dynamic_table
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = fieldcatalog_tab
importing
ep_table = table.
Here table is defined with data object type.
now assign table reference to field symbol of type table.
ASSIGN table->* to <field-tab>.
Also create work area <field-wa> using refrence of table.
create data object wa LIKE LINE OF <field-tab>.
ASSIGN wa->* to <field-wa>.
Also define field symbol for field name.
for e.g. <field_name>
7. Dynamic internal table is ready
Now using can use select as follows:
SELECT (fields) "--> fields is single column internal table to hold fields need to be selected
INTO CORRESPONDING FIELDS OF TABLE <itab> "--> itab created dynamically at runtime
FROM (TABLE_NAME) --> Table name imported
WHERE (where_clause). --> where_clause is single column internal table with data type CHAR72.
Select data into <itab> and use ASSIGN COMPONENT to move data from one table to another as follows:
8. To fill this dynamic internal table using ASSIGN COMPONENT <Comp_number> OF STRUCTURE <field-wa> TO <field-name>
So in this case if first field of structure STRUCT1 is user_id then sudo-code will be
loop at internal table containing list of fields into field_wa
ASSIGN COMPONENT field_wa OF STRUCTURE <field-wa> TO <field>. "Here field_wa is wa area for single column internal table holding all the fieldnames.
Now <field-name> points to user_id field. Move some value into it as nornally we do with variables.
move '001' to <field-name>.
or
<field-name> = '001'.
endloop.
after completing all the fields one row will be ready in <field_wa>.
APPEND <field_wa> to <field_tab>.
Let me know incase you face any issues!
Hope this helps you.
Thanks,
Augustin.
Edited by: Augustarian on Aug 23, 2009 7:02 PM
Edited by: Augustarian on Aug 23, 2009 7:08 PM
Edited by: Augustarian on Aug 23, 2009 7:09 PM -
Function Module where-used list does not find update rule programs
We have function modules called in update rules. The where-used list in the function builder does not find the update rule programs.
For example, function DATE_GET_WEEK is called in an update rule to InfoCube YCUBE001. The activated program name for this update rule is GP3PWI6PKM5Y3K75A370DIS8I77. When I goto SE37, enter the function DATE_GET_WEEK, click the where-used button, check the programs option and search. The system does not find the program GP3PWI6PKM5Y3K75A370DIS8I77.
Without this search capability it is difficult to do an impact analysis of changing function modules. Does anyone know of a solution?hi,
i think the reason is the code of update rules' generated program are stored line by line in table(rsaabap), update rules program itself stored in table rsupdrout, link with field codeid, another useful table is rsupdinfo which store infocube, infosource related. other info may stored in some other rs* and rsa* tables.
try to create following program in your system, and run, type in the function module name, and will display out the update rules program id, with additional useful info : which infoprovider, infosource, and detail info of the routine and infoobject in the update rule that using that function module. you may modify the program to have better display out list.
hope this helps.
REPORT Z_FM_UPDRUL_WHEREUSED.
data : lv_sfm,
lv_line type string,
lv_where type string.
tables : rsaabap,RSUPDROUT,rsupdinfo.
select-options:
s_fm for rsaabap-LINE.
start-of-selection.
loop at s_fm.
concatenate s_fm-low ' ' into lv_sfm.
concatenate '%' s_fm-low into lv_line.
concatenate lv_line '%' into lv_line.
write : / 'function module', 'update rule id', 'routine id', 'infoobject', 'infocube', 'infosource'.
select * from rsaabap
where line like lv_line and objvers = 'A'.
select * from rsupdrout
where codeid = rsaabap-codeid and objvers = 'A'.
select single * from rsupdinfo
where updid = rsupdrout-updid and objvers = 'A'.
write: / lv_sfm, rsupdrout-updid, rsaabap-codeid,
rsupdrout-iciobjnm, rsupdinfo-infocube,
rsupdinfo-isource.
endselect.
endselect.
endloop. -
Function module to copy INVOIC IDOC
One of our customers use the IDOC message type INVOIC. When the IDOC are received and the proces has been started, we will like to make a copy of the IDOC with the status code 70.
I know this functionality exist when we change the segment data using the transaction code BD87, and I have debugged this transaction, but the "copy" functionality are developed in the program SAPLEDI5 and not in a function module.
I am looking for a function module to handle this functionality. Hope you can help me.
Per LarsenTo make a copy of idoc message type, you simply have to find the linked Function module of the Idoc. So for INVOIC, there would be a linked Function Module , you can copy the interface of the Function Module and build your own custom Function Module (Z function module) to attach it to the message type.
So the steps to your problem would be:
1. Copy the FM to attached mesaage type into a Z function module.
2. Write the functionality you require in your Z function module.
3. Attach the message type/ idoc type to this function module. The systematic steps to this can be simply carried out in the Transaction WEDI which is an area menu for EDI/IDOC . Depending on whether it is inbound/outbound, you can follow the steps.
Cheers!
Disha -
Multiple calls of same function module do NOT initialize variables ?
Hi all,
..so its my fist post here, this is a bit strange problem for me and maybe someone knows whats happening.
So I have in SAP Solution Manager a function module 'Z', which calls a standard SAP class CL_SPROJECT_SOLAR_BASE_REPORT, which in turn calls the standard function module 'SPROJECT_GET_ADMIMP_SCREEN_BP'.
During development, things worked fine, but now I run my Z-Program for more than one instance and even I do all FREE for the Class, apperently the function module SPROJECT_GET_ADMIMP_SCREEN_BP, which is called by the class CL_SPROJECT_SOLAR_BASE_REPORT, does not get it's variables from the global data of the function pool re-initialized, when it is called for the second, 3rd, ... time.
This is a bit strane behavior for me, I would have expected that variables in a function module (or even in the global data of that function pool) get re-initialized each time that function module is called ?
Actually, this is the only function in that function pool.
Well, if not, does anyone has an idea how I can get the variables of this module pool re-initialized between the calls ? More concrete, the global data of function pool SAPLSPROJECT_SOLAR_ADMEVAL_BP define:
DATA: g_v_with_var TYPE char1.
In the function module line 36 (no reference to g_v_with_var, no module call, no changes to g_v_with_var before the IF-statement at all) it is querying:
IF g_v_with_var IS INITIAL.
So this is my problem, the second time I am calling the class (which is 'free'ed and re-created between the calls) which calls this function module the 'g_v_with_var' is not initial and there seems to be no way to have it set to initial again ?
So even thought this is in SolMan, I think the question & problem is a ABAP technical one ?
Any thoughts, help or support would be very much appreciated,
thank so much,
FrankHi Mae,
..thanks a lot for your fast reply, unfortunately there is only one function and no functions or forms at all for initializing. The variable I am fighting with is g_v_with_var and that is referenced only 4 times in the whole function pool:
Global Data: 101 DATA: g_v_with_var TYPE char1.
Function Module SPROJECT_GET_ADMIMP_SCREEN_BP (which is the only function module):
36 IF g_v_with_var IS INITIAL.
127 g_v_with_var = airep_true.
193 CLEAR g_v_with_var.
If in line 36 g_v_with_var is 'X', which it is always after the first call, the function will exit with an exception, so line 193 to clear it will actually never be executed...and it is not cleared the next time the function module is called, so you never get back to have the function run...
All the best,
Frank
Maybe you are looking for
-
does anyone know if windows vista will run off of boot camp?
-
I want to launch Word with a button
That's it ! I want to launch Word inside firefox with a button on the toolbar. How can i do ? I inserted a "new button" browsing the word icon in the "image" request. but thbe icon does'nt appear. I have no idea for i must comlete in "code" request
-
Updating problem of acrobat standard to 8.1.3.
I tried to update my acrobat standard 8 to 8.1.3. The installation progress was stuck. I terminated the installation and tried again. This time, I received a message saying the installation failed. What can I do?
-
IOS 5.1.1 asking microphone dication
my iphone 4 ios 5 .1.1 asking micro phone dictation to procced [ SAYING LIKE THIS WHEN YOU TAP THE MICROPHONE BOTTON ON THE KEYBOARD WHAT YOU SAY WIIL BE CONVERTED TO TEXT DICTATION WORKS WITH ANY APP WITH A KEYBOARD? iam unable understand what is i
-
Hue Saturation not going to white or black
So for some reason, i am sliding the LIGHTNESS bar all the way to black,but it ends up turning the color grey instead of black the pixels are 100% opacity. layer mode is also normal Ive been using photoshop for a while now, and this is the first time