Validations in RFC Programming
i have to add a field by name (vendor reference) in RFC Table and that should be an optional field and the validations that i have to do is that
The entered value should exist in the table LFA1 and in the field LIFNR (LFA1-LIFNR) or the entered value should me a text with"NO-ALLOC"
Otherwise it should show an error,
Please provide me the code and i have to write the code in RFC's
Hi,
say the field name in RFC is V_LIFNR
If not V_LIFNR is initial and ne 'NO-ALLOC'.
select single LIFNR from LFA1
into l_lifnr where lifnr eq v_lifnr.
if sy-subrc ne 0.
RAISE NO_DATA.
endif.
endif.
In EXCEPTIONS tab, mention NO_DATA.
Best regards,
Prashant
Similar Messages
-
BOEDGE - SM59 Connection RFC = Program Not Registered
Hello,
I installed on a server Windows Server 2003 SP1 32bit:
- BO Edge 3.1 (BuildVersion = 12.1.0.914)
- Java Connector 2.1.9
- Integration Kit for SAP 3.1 SP3 (BuildVersion = 12.3.0.601)
I see on the CCM (Central Configuration Manager) my services correctly started:
Apache Tomcat -- Running
BW Publisher Service -- Running
Server Intelligence Agent -- Running
I installed on the BW server the transport order of BOBJ INTG for "BOBJ INTG for SAP XI 3.1 FixPack 3.1" (BuildVersion=12.3.1.684).
I created a RFC connection type TCP/IP and test my new connexion and I have a error message:
Connexion Erreur connexion
Détails err. Error when opening an RFC connection
Détails err. ERROR: program BW_PUBLISHING not registered
Détails err. LOCATION: SAP-Gateway on host myserver.com / sapgw10
Détails err. DETAIL: TP BW_PUBLISHING not registered
Détails err. COMPONENT: SAP-Gateway
Détails err. COUNTER: 51016
Détails err. MODULE: gwr3cpic.c
Détails err. LINE: 1812
Détails err. CODE RETOUR: 679
Détails err. SUBRC: 0
Détails err. RELEASE: 700
Détails err. TIME: Fri Sep -
Détails err. VERSION: 2
An idea?Hi,
In Central Management Console ie, Admin application of BOE, you need to configure the BW system. Use the below URL,
http://<serverhostname>:<port>/CmcApp
After logging in Select the Authentication and SAP as authentication type. Regarding how to configure, follow the configuration steps mentioned in the below article:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a00ee3b2-5283-2b10-f1bf-8c6413e0898f
Once you import the roles with the above configuration, the user with which you are validating the RFC connection will be imported in the BOE.
Now, verify the RFC in the BW system.
Regards,
Noor. -
JCO.Server Error while trying to execute a RFC program from SAP
Hi,
We are connecting to an external registered server program from SAP via Web Methods.
The external server program is registered with the SAP Gateway. We have created a TCP/IP RFC destination and are able to connect to the destination successfully via SM59.
An RFC function is created in SAP and is called using the syntax CALL FUNCTION "/NGN/BAPI_STRE_SEARCH_PROCESS" DESTINATION 'PRDB2B'. We have also handled the COMM_FALIURE and SYSTEM_FALIURE exceptions in the function call.
We are monitoring the gateway via SMGW and see a connection log to the RFC destination as below
Number - 10
LUname - dev01
TPName - sapgw00
User - KRAORANE
Status - CONNECTED
Symbolic - PRDB2B
Conversation - 86520353
Prot - REG
SAP return code - 0
CPIC rtn code - 0
The external program returns results as expected.
However sometimes the RFC fails and returns the message JCO.Server could not create server function /NGN/BAPI_STRE_SEARCH_PROCESS.
We are not able to figure what exactly is causing this error. Any help will be highly appreciated.
-KiranHi,
Please see the below links..
JCO.Server Error while trying to execute a RFC program from SAP
Re: JCO.Servcer could not find server function
Re: JCO.Server could not find server function 'SET_SLD_DATA'
/people/kathirvel.balakrishnan2/blog/2005/07/26/remote-enable-your-rfchosttoip-to-return-host-ip-to-jco
Re: interfacing SAP with an existing java applications
http://help.sap.com/saphelp_nw04/helpdata/en/47/80f671ee6e4b41b63c0fe46bd6e4f8/content.htm
http://www.sapgenie.com/faq/jco.htm
Regards
Chilla.. -
hi all
how to do validation in file to RFC
regards
krishHi krish,
Yes you can validate with RFC,please see below links
http://help.sap.com/saphelp_nw04/helpdata/en/76/98384162316532e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/11/028417f9f8b24cbe1b0b398e1cb76a/frameset.htm
CO Validation using RFC - URGENT!!!
User RFC validation
RFC Sequence
Regards
Chilla.. -
Getting error in XI"RFC Program Not Found"
Hi All,
I am getting error in SXMB_MONI "RFC Program not found via SAP XI".
So please suggest me what is the problem behind this..For these SAP XI and R/3 i made 3 to 4 RFC program but only 1 RFC program name not getting Via SAP XI.
Thanks
AmitHi,
I am calling RFC FM via SAP XI.
Main Records are coming from siebel and recevied by SAP XI and XI will do some changes in records and calling REC FM from SAP R/3.
Problem is siebel to xi records coming fine but xi to sap R/3 error message coming "Program not Found".
Thanks
Amit -
How to do the Validations in Report Programming?
How to do the Validations in Report Programming?
how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
Tks
DurusojuAT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION. -
Hello All,
I need you help regarding the RFC programming. My client wants me to transfer a table frm one sandbox to another. Also once this table is transferred then every night the change in sandbox 1 shud be transferred to sandbox 2 for new entries; And they have specifically asked me to use RFC programming. can you tell me how do i go about it?
thanks and regards,
GaurvaHi,
Write a report program in sandbox 2 using function module RFC_READ_TABLE and import parameter give the sandbox 1 table name and in destination give the RFC destination from sandbox 2 to sandbox 1. This function module will give you all entries in table from sandbox1,
Write a logic in your report program in sandbox 2,
first you select entries in sandbox 2 table comparing with table values you got thru fun moudle and update the same in sandbox 2
aRs -
Where can I get documentation or sample code for writing C++ RFC program?
Hi all. I am trying to write a UNICODE C++ program that uses standard C++ classes. In addition, the header files that were generated by genh contain C++ class declarations from templates. The class that the template is based on is CAbapType. I have several questions:
1. Where are the sapstring.hpp sapiostrm.hpp, etc... classes that are documented in the document sapucdoc.htm? These are supposedly the header files that can be used to get access to C++ standard library functionality.
2. Where is CAbapType defined? I am trying to use classes instead of the structures that were defined in the header file, but without the definition of CAbapType, my code won't compile. The header file I'm referring to was generated by genh.
3. I was able to write a C program that uses the structures define in header files generated by genh. But when I attempt to compile the same code with the C++ compiler, I get all sorts of errors about how the use of cU is deprecated. cU is the macor used to make Unicode coding easier. Anybody have any clues on how to solve that? Thanks.
Also, if there is any good documentation on how to write a C++ RFC program, can you please point me to it. So far, I have 1 RFC SDK document that is all about writing C code, but nothing abuot writing C++ code. Thanks.I have the same problem. All of the xmp examples and comments in the SDK are great and all, but as far as I can tell, they only show you how to read from or write XMP to a buffer. The real magic here is how do I get data into and out of images??? I've been trying to find out how to identify an "APP1" marker in a jpeg file for a week now. It seems to me that Adobe just expects you to roll your own. If I could do that to begin with, then I'd just put my own xml based data in from the start...
-
Idoc - XI - File scenario: R3 RFC Program Not Registered
I have been going through all of the outbound idoc guides and other forum messages, but still cannot figure out how to get my rfc registered. This is my SM58 error on R/3.
Connection error program SAPXI_IDOC not registered / CPI-C error CM_ALLOCATE_FAILURE_RETRY.
I have SM59, IDX1, and IDX2 set up on XI, but cannot get them registered. Is there some sort of activation or cache refresh I need to do?
More details-
(my R/3 system is RD0-120 and my XI system is XD0-110)
R/3 TCP RFC: SAPXI_IDOC
R/3 tRFC Port: SAPXI_IDOC
R/3 BD54: RD0120 and XD0110 are set up (wasn't sure which system)
XI SM59:RD0120 (tests ok)
XI IDX1:SAPRD0 (client of 120, RFC destination of RD0120)
XI IDX2:(SAPRD0 metadata, my 2 idoc types, and client 120)
ThanksHi Keith,
>>>R/3 TCP RFC: SAPXI_IDOC
why did you call tcpip connection IDOC?
you have to use R3 type connection
in order to send idocs to the XI
you don't need tcpip - so delete it and try again
Regards,
michal -
XSD VALIDATION IN ABAP PROGRAM
Hi,
I have a requirement where in a report i am picking xml file from the presentation server (desktop) and then i am parsing the xml file using FM "SMUM_XML_PARSE" (first i use FM SCMS_BINARY_TO_XSTRING and then SMUM_XML_PARSE). after using the function SMUM_XML_PARSE i get the xml data in my internal table and then my report uses that data for some processing. This all is working fine .
My issue is that how do i do a XSD VALIDATION for the xml file that i am reading . I would have liked to do a xsd validation after i import the xml file and throw error if the xml file is not as per its xsd.As i am not using any middleware technology like XI/ WTX which have XSD validation functionality i am not sure how to achieve this in abap program.Hi,
I think you're right, iXML can only validate DTD via its if_ixml_parser->set_validating method (you can find this information in SAP SDN article "ABAP XML Mapping", as of release 6.10, I couldn't find any other reference saying that xsi:noNamespaceSchemaLocation is supported since then).
By looking at SDN, I saw an external link about XSD to DTD conversion via XSLT (http://crism.maden.org/consulting/pub/xsl/xsd2dtd.xsl), but I don't have any idea if it works. On another thread, people used OS command to do XML/XSD validation, but didn't describe what they ran exactly (anyway, that means using any external tool).
Sandra -
Hi,
My scenario is R/3 to Webservice (synchronous scenario). I have created a custom function module which is remote enabled. In RFC Sender Adapter, I used the same program id which I entered in the RFC destination. In my source R3 system, I am able to login remotely using the test connection. So the RFC destination between the R/3 and XI system is fine.
I checked the SMGW to check the logged in clients. I could see the host and program id in the list.
But when I execute the RFC in the R/3, it's giving a short dump. It says The 'destination' "wbser" for a Remote Function Call is unknown. I also checked ST22 to analyse the short dump. It didn't return anything.
I also paste the code here:-
REPORT Z_WEBSERVICE_GETDATA.
data: lv_data type char10.
CALL FUNCTION 'Z_WEBSERVICE_TEST' destination 'wbser'
EXPORTING
FROMCODE = '0001'
TOCODE = '0999'
IMPORTING
DATA = lv_data.
write : 'Data is : ' , lv_data.
Can anyone suggest how to fix this.
KrishnanHi Jai,
>>1. wbser is the name of the RFC destination of type T.
yes
>>2. wbser points to the same R/3 and not XI.
yes
>>3. wbser contains the same program Id(case sensitive) as mentioned in cc.
yes
>>4. CC and corresponding sender agreement is active in ID.
yes
Regards.
Krishnan -
Hi,
We want to use validations ( available thru tcode okc7) in z program.We got function module G_VSR_VALIDATION_CALL
to call these validations but these have steps in them and if we want to call some specific step no (for ex. 3) in function module there is no variable to pass the step no.
Please guide us, how to use validations and substitutions in Z program.
Thanks In AdvanceHello Sapna.
Do you know report RGGBS000 and RGGBR000?
In your Z program, you can call it's routines.
Best regards.
Valter Oliveira. -
CO Validation using RFC - URGENT!!!
Hi,
I'm looking for a way to perform the CO validations (defined in Tran. OKC7) using remote function call.
Is there is any way to do so?
What function module do we have to use?
How complicated is it?
RazHi Sat,
Thanks, but we are not using IS-U or any other IS, we are using ECC5 with it's core functionality.
Actually what i'm looking for is the function that performed the CO validations check when creating a purchase requisitions and purchase orders in ECC, and to call this function with RFC.
We are using SRM and need the perform the CO validations in SRM as it done in ECC pur. documents.
Raz -
Validation on Investment program position
Dear All,
In current configuration, a WBS element of a project is linked to an Investment program position.
When saving reservations for materials, Can we do a validation for WBS element specified in the Proc. Param of a material and the Investment program position.
Please let me know whether this can be achieved without a customization.
ThanksI've used both and never had any issues.
But be thoughtful of coding masks (of AR and WBS) in case you use appropriation request creation followed by WBS/project creation.
Regards
Sreenivas -
Sorting criteria not validating in Z Programe development
We are in process of data fatching in a Z development program and faced with following situation;
1. We pass criteria as Fiscal Year 2010 and posting date as 01.04.2010 to 30.04.2010
2. Accourding to above input we fatch data in MSEG table
3. But when passing the MSEG reference field into header table MKPF we find different date (i.e. October 2010) which is different from initial data range (i.e. April 2010)
It seems that we are unable to put date check criteria,
How could we initiate the date check successfully. Kindly suggest.
Regards
MayoorSir ;
we seek your Guidance within Following Criteria :
1.) we r under the process of sorting data having material movement with Financial Impects
2.) how to sort data from the related tables since we have two year's that is Material year and fiscal year.
3.) we desire to sort data specific to particular date range with in one Period
Plz. advice.
Maybe you are looking for
-
Data Source Groups in Query no reflecting changes in Admin
Version of US used: 1.0.3 I removed some data source groups and add new ones in the Admin Application. But the default Query Application does not reflect these changes. That is, when I go to Advanced Search in the Query Application, the list of Data
-
What is the sign of an External Drive Gone Bad?
I tried to copy a folder from my external LaCie backup drive to my Mac. The copy operation stalled about halfway through. After 10 minutes a 40 MB folder was still not copied. So I clicked the Stop button in the copy dialogue, and then I got the spin
-
I would like to upgrade my Macbook Pro Model A1278.
Hi, I would like to upgrade RAM and hard drive memory on my Macbook Pro Model A1278, but I'm not sure what is the maximum RAM I can install and what is the maximum hard drive memory I can install if its even doable. Also, which are the parts I should
-
Hello, all Q - Does the Air's "Refresh Information" for 3rd Party installations rely upon the latter's timely information refreshing? (An aside - Yes, I must update my Product Information!) Adobe flash player's December version 11.9.900.170 automatic
-
What do I do to get it back?