How to keep field as mandatory in function module
I have one field in import parameter can you please suggest how to keep it as mandatory
Thnx
In IMPORT parameter tab you have one checkbox OPTIONAL, if you check it that field will be optional otherwise it is mandatory.
Best Regards,
Vibha
*Please mark all the helpful answers
Similar Messages
-
GP: How to keep action sleeping until ABAP function module raises event
Hello experts,
I'd like to develop a gp process which contains a callable objects which keeps the process instance waiting until an abap function module send something like an event.
I don't want to put too much load on the machine and block expensive JCO ressources.
Does anyone have an idea how to solve this?
Thanks very much
StefanHi Mike,
GREAT! Many thanks! Sometimes solutions may be so simple.
For all others who have the same problem a bit more in detail:
In your FM just enter as exception: CX_BO_ACTION_CANCELLED and mark 'Exceptn. Classes'.
Declare your class method with the exception cx_bo_action_cancelled.
In your class method just enter your FM via the 'Pattern'-Button.
The Pattern will show only the Import- and Export-Parameters but not the exception (class).
Regards,
Georg -
How to get sysnr value in a Function Module
Hi all,
I need to get the sysnr(system number) value of the R/3 system. I execute a RFC function module and need to get the value of sysnr of the system it executes in as a return parameter. Can somebody tell me how to get this value in the function module and return it.
Thanks and Regards,
PratikHello Pratik
The system number has to be defined in the RFC destination. Thus, select on your local system (where you call the RFC function module) the corresponding RFC destination from table <b>RFCDES</b>. In field RFCDES-RFCOPTIONS you will find a string like this:
H=<ip address>,S=21,R=N, ...
S=system number
Regards
Uwe -
How to pass select-option filed to Function Module Exporting Parameter
Hi,
How to pass select-option filed to Function Module Exporting Parameter.
ThanksHi,
DATA: BEGIN OF ITAB5_WRK OCCURS 0,
KUNNR TYPE KNKK-KUNNR, "CUSTOMER #
SBGRP TYPE KNKK-SBGRP, "CREDIT REP
KLIMK TYPE KNKK-KLIMK, "CREDIT LIMIT
NAME1 TYPE KNA1-NAME1, "CUSTOMER NAME
SKFOR TYPE KNKK-SKFOR, "TOTAL A/R
AMT1 TYPE KNKK-SKFOR, "CURRENT
AMT2 TYPE KNKK-SKFOR, "01-30
AMT3 TYPE KNKK-SKFOR, "31-60
AMT4 TYPE KNKK-SKFOR, "61-90
AMT5 TYPE KNKK-SKFOR, "91-120
AMT6 TYPE KNKK-SKFOR, "OVR 120
BZIRK TYPE KNVV-BZIRK,
END OF ITAB5_WRK.
SELECT-OPTIONS P_COMP FOR T001-BUKRS
SELECT KUNNR SBGRP FROM KNKK
INTO TABLE ITAB5_WRK
WHERE SBGRP IN P_REP
AND KUNNR GE '0001000000'
AND SKFOR NE 0.
LOOP AT ITAB5_WRK.
DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
ENDLOOP.
PERFORM GET_CREDIT_LIMITS.
*=======================================================================
IF P_DIST NE SPACE.
LOOP AT ITAB5_WRK.
SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
AND VKORG EQ P_COMP
AND VTWEG EQ '20'
AND SPART EQ '10'
AND BZIRK IN P_DIST.
IF SY-SUBRC EQ 0.
MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
MODIFY ITAB5_WRK.
ELSE.
DELETE ITAB5_WRK.
ENDIF.
ENDLOOP.
ENDIF.
*==============================================================
LOOP AT ITAB5_WRK.
MOVE: 'F/S' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
PERFORM AGING.
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MOVE: 'SPEC' TO WRK-KKBER,
ITAB5_WRK-KUNNR TO WRK-KUNNR.
*PERFORM AGING.*
ADD: W_SNFAE TO ITAB5_WRK-AMT1,
W_SFAE1 TO ITAB5_WRK-AMT2,
W_SFAE2 TO ITAB5_WRK-AMT3,
W_SFAE3 TO ITAB5_WRK-AMT4,
W_SFAE4 TO ITAB5_WRK-AMT5,
W_SFAE5 TO ITAB5_WRK-AMT6,
W_SFAEL TO ITAB5_WRK-SKFOR,
W_SNFAE TO ITAB5_WRK-SKFOR.
MODIFY ITAB5_WRK.
ENDLOOP.
FORM AGING.
*CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'*
EXPORTING
BUKRS = P_COMP
KKBER = WRK-KKBER
KUNNR = WRK-KUNNR
RASID = 'FEND'
KLIMP = 'X'
IMPORTING
SFAE1 = W_SFAE1
SFAE2 = W_SFAE2
SFAE3 = W_SFAE3
SFAE4 = W_SFAE4
SFAE5 = W_SFAE5
SFAE6 = W_SFAE6
SFAEL = W_SFAEL
SNFA1 = W_SNFA1
SNFA2 = W_SNFA2
SNFA3 = W_SNFA3
SNFA4 = W_SNFA4
SNFA5 = W_SNFA5
SNFA6 = W_SNFA6
SNFAE = W_SNFAE
EXCEPTIONS
NO-AGING_SCHEDULE = 1
NO_TABLE_INPUT = 2.
CASE SY-SUBRC.
WHEN 1.
MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
WHEN 2.
MESSAGE E999 WITH 'DO NOTHING ??'.
ENDCASE.
ENDFORM. "AGING
Thanks -
How to pass BI Query parameters from Function Module
Hi,
We are executing the BI queries using the Function Module "RS_VC_GET_QUERY_VIEW_DATA_FLAT" by passing the query name and the provider information.
Is there a way, to pass the filter parameter values also to the query by using this function module? I am not sure how the VC tool is using this Function Module to call the BI queries and passing the filter values.
Your help is appreciated.
Thanks
SuriSuryanarayana,
Are you trying to execute a query in batch?. If you want to execute try to look at WRITEQUERY - which is a standard SAP program. You can execute this program directly or you can customize it completely and produce the output in .CSV file.
Hope this helps. Award points if useful.
Goodluck,
Alex (Arthur Samson) -
How to read current line number in function module sourrce code?
Hi All,
How to read current line number in function module sourrce code?
regards,
AnujIf you have new editor you would be able to see the line number.
Or in the Dump screen - there is a button called Debugger - click that you would be able to see the code where dump has occured.. you would be able to find the line number from there.
To get the new editor with line number , you need to change the settingsin SE38.
Regards
Vivek -
Hi,How to add field to sap Liquidity calculation module tables?
Hi Experts,
How to add field to sap Liquidity calculation module tables?
and how to add a field to a particular transaction code using a customer exits.
please tell me in detail.
thanks inadvance,
Regards,
RekhaHi Pranab,
Please follow the below steps to create an extra field and write code for that field through Infoset.
1-->Change in Infoset
u2022Go to SQ02 , enter Infoset name and click on Change Button
u2022Go to Extras (F5) button displayed on application bar.
u2022In Extras tab, click on 'Create' icon to create additional field E_NAME1, give as type C (character) and give desired length and. Enter header description as 'ShipToName'
u2022Select this field i.e E_NAME1 in one of the field group of Infoset.
u2022Go to Code section (Shift+F8) of infoset, Select Record Processing Event and write your logic code (condition) in this code section:
if vbpa-adrnr = space.
E_NAME1 = kna1-name1.
else.
E_NAME1 = adrc-name1.
endif.
2-->Generate the Infoset.
3-->Change in Query
u2022Go to SQ01(in a new session), give your query name (by selecting your user group) and click on change button.
u2022Check the field group in which you have added E_NAME1 field, then check E_NAME1 from Fields screen
u2022Click on 'Basic List' button; give line (row no.) and sequence (column no.) for extra fields.
u2022Execute/Test the Query, you will get desired result.
Please let me know, if you need more information.
Regards,
Dinesh
Edited by: Dinesh Tiwari on Oct 29, 2009 7:13 AM -
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.
-
How to pick the entries from a function module fields values
hi guys,
i have a function module 'BP_JOBLOG_READ.when i execute this for a particular jobname,i will get some entries.again if i click those entries,i will get some fields with values.in that one field 'text' contains total credit amount(purely numeric).how to fetch this value into internal tabel and update into my internal table.very urgent.plz provide some coding.rewards wil b there for helpful sggestion.Mahesh,
Use the FM BP_JOBLOG_SHOW to display those job logs.
Hope this is helpful.
Thanks,
Naren -
Hi,
I want to set a field as mandatory. It we didn't give any data in a field and save it should not accept the null value how to set it.
Regards,
MadhaviHi David,
I wrote that code but the error comes where oSBO and bmt_Short comes. What should i do for that.
And i gave a code for combo Mandatory
Dim oForm2 As SAPbouiCOM.Form
Dim oCombo As SAPbouiCOM.ComboBox
oForm2 = SBO_Application.Forms.Item(pVal.FormUID)
oCombo = oForm2.Items.Item("cbocate").Specific
If oCombo.Selected.Value = "" Or oCombo.Selected.Value = Nothing Then
BubbleEvent = False
oCombo.Active = True
SBO_Application.SetStatusBarMessage("Category Code should not be left blank")
End If
Its working but an error come 'Object Reference Not added to the Instance of an Object'
But the same code is working for EditText without any error -
HOW TO SPECIFY FIELD AS MANDATORY IN D3L
hi
i know that in dtd we can mention a field is mandatory or not.How can we do the same in D3L.
actual requirement is a field in a text file is mandatory.If i import dtd (with filed specified as mandatory) in to istudio to define common view ,it should be fine.But i like to know if there is any way to define a field as a mandatory field in D3L?..
Please reply as soon as possible.
ThanksIn IMPORT parameter tab you have one checkbox OPTIONAL, if you check it that field will be optional otherwise it is mandatory.
Best Regards,
Vibha
*Please mark all the helpful answers -
How doset the Field as mandatory at UI Level
Hi all,
How do set the field as mandatory at UI Level.
Thanks in advance
C.KarukkuvelHi Pedja,
Thanks.Working fine.
Regards
C.Karukkuvel -
How to use a Logical Database in Function Module.
Hi Experts,
I want to use a logical database in a Function Module to fetch data from a standard SAP table into a Internal table for certain filter conditions.
How can I get get this done????
I called LDB_PROCESS FM in my FM, but I could not figure out how to store the extract in my IT table since we cant use GET in FM.
Please provide me a sample code if possible.
Thanks in Advance,
Alex.Hi,
i had an example program like this ,in this i want to get the data using pnp logical database with 5 fields in an interface program.
data: begin of it_final occurs 0,
pernr like pa0002-pernr,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
usrid like pa0105-usrid,
usrid_long like pa0105-usrid_long,
end of it_final.
get pernr.
clear : p0000,p0002,p0105.
rp-provide-from-last p0000 space p_date p_date.
if p0000-stat2 = '3'.
v_pernr = pnppernr-low.
else.
reject.
endif.
*---Get employee pernr, First name ,Last name into final table
rp-provide-from-last p0002 space p_date p_date.
if pnp-sw-found = '1'.
it_final-pernr = p0002-pernr.
it_final-vorna = p0002-vorna.
it_final-nachn = p0002-nachn.
else.
*---Error message if not infotype 0002 maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-EMI '0002'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
**--Get SYSTEM USERNAME to final table
rp-provide-from-last p0105 0001 p_date p_date.
if pnp-sw-found = '1'.
it_final-usrid = p0105-usrid.
else.
*---Error message if not SYSTEM USERNAME maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-003 '0105'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
**--Get Email ID to final table
rp-provide-from-last p0105 0010 p_date p_date.
if pnp-sw-found = '1'.
it_final-usrid_long = p0105-usrid_long.
else.
*---Error message if not Email ID maintained
T_ERROR-PERNR = pnppernr-low.
CONCATENATE TEXT-004 '0105'
INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
APPEND T_ERROR.
CLEAR T_ERROR.
endif.
append it_final.
clear it_final.
reward points if useful,
venkat. -
How to use parameters in smartform genrated function module
i executed smartform one functional module is genrated '/1BCDWB/SF00000002'
now the problem is that i want to send output of this smartform through email
now how to use ' MAIL_RECIPIENT ' and ' MAIL_SENDER ' to send smartform output through email .
please check following module which generated by smartform.
plz suggest me .
CALL FUNCTION '/1BCDWB/SF00000002'
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
ITAB_PA0001 = ITAB_PA0001
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.Hi
You can do it while passing these parameters in the CONTROL_PARAMETERS.
data: ls_CONTROL_PARAMETERS type SSFCTRLOP.
ls_CONTROL_PARAMETERS-DEVICE = 'LOCL'.
ls_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ls_CONTROL_PARAMETERS-PREVIEW = ' '.
Pass this ls_CONTROL_PARAMETERS to the importing parameter of the FM .
CALL FUNCTION LF_FM_NAME
EXPORTING
CONTROL_PARAMETERS = LS_CONTROL_PARAM
In addition to this, you might also want to set the print immediately field on the same structure to 'X'.
Generally you leave the device field empty, the user master record default printer will be used -
How to set lowercase/uppercase checkbox in function module/RFC
Hi2All
I m importing username and id in a RFC. i want this username as it is when we pass it in function module. if we set the check box lowercase/uppercase option when executing function module, it will keep all input as it is (means will not convert all inputs to CAP) .
So how can i keep this chechboc checked forever for my RFC?
Bye....!!!Hi,
I don't think that's possible. I cannot able to find any SET/GET parameter assigned to it. If you are calling RFC from some other application, then you need to send your data as capital letters, or if it is custom RFC , then you can code into your code to convert small to capital letters. or if you are using a SAP standard then write wrapper function module.
a®
Maybe you are looking for
-
hi have just purchased iphone 4s . my itunes on my mac is currently 10.4 . 10.5 is needed for the new iphone but when i download it and click on install the itunes about still says 10.4 . have tried to update through itunes but it says there is no so
-
Data Recovery Software for the Zen Vision M
Data Recovery Software for the Zen Vision M: Has anyone had any success recovering lost sound files from a Vision M, with software, physical repair services, or otherwise? Does anyone claim to be able to recover information from these devices? The da
-
Help! My button is huge, ugly, and non-button like...
Hopefully this is an easy one. But I'm just stumped why I can't shrink this button down. Its taking up the entire SOUTH despite that I am trying to set its dimensions explicitly with setSize. This is in an Applet. Can someone tell me why setSize is n
-
OAB in Outlook 2010 error "unknown error 0x8007007A" on download
Hi all. We have an issue with OAB not downloading with error "unknown error 0x8007007A". Autodiscovery test doesn't show any error and seems to be correct. The only strange to me that I can't open OAB Url http://srv.domain.local/OAB/61555bea-e998-4ed
-
Why is beat audio on the HP Pavilion 15 Notebook PC so terrible?
I have had bad experience with audio on HP notebooks previously.... I had a dm1 which had a flawed duel mic/phones mini jack. Years later (few months back), i was after new laptop. Decided upon a bigger machine, again HP pav. 15. I figured it would