About bapi return types
hi guys,
i was wondering if the bapi return table with the types, is it possible that the type 'E' and the type 'W' co-exist in the return table.
'cause my program now need to make a judging under the type 'W'.
thanks.
Adamyam,
It is possible to get a Warning and Error for a single transaction.
Warnings are discarded and the transaction will go further, however when a Error happens processing is stoppped and is not taken further.
Regards,
Ravi
Note : Please reward points if this helps.
Similar Messages
-
About return type and parameter type in IDL
I don't know how to define return type and parameter type in
operations in a module which are not listed in predefined in
IDL. can I define these types as java class?
can someone help me where a tutorial about this in detail can
be found?
thanks a lotMy understanding is that if something is not in the IDL definition, then as far as the CORBA system is concerned it doesn't exist.
Therefore any methods you create in a class that implements an IDL defined interface, that are outside that interface, are completely free and outside the CORBA system.
The parameters and return types of these 'local native' methods should be java classes. All methods and variables outside the IDL spec will only be visible to the local JVM.
ciao
Jim
PS - there is a zip file containing a very long and fairly messy demo of this behaviour at http://clio.mit.csu.edu.au/subjects/itc327/Asg2Demo.zip
it has an html file which describes using additional non-IDL 'local native' methods for implementing a save/load function -
Multiline BAPI return structure and RFC Adapter
Since SP14 RFC Adapter check return structure of RFC function.
But how it works if BAPI returns multiline BAPIRET2?
Will adapter loop all elements and perfom commit only if <b>all</b> alements don't have errors.I'am about this:
<i>As of SP 14 support for commit handling for single BAPI calls was added to the RfcAdapter receiver channel. If activated in the receiver channel setting, the received XI message will be executed as synchronous RFC (sRFC) in the receiving system. This is also true for asynchronous (QoS EO) XI messages to receive and analyze the execution result by the RfcAdapter.
The received response is parsed by the RfcAdapter to get the BAPI return parameter with name "RETURN". This return parameter can be of BAPIRETURN, BAPIRET1 or BAPIRET2 types. The "RETURN" parameter is checked for the response status (field TYPE) which can take following values:
1. 'S' : Success
2. 'I' : Information
3. 'W' : Warning
4. '' : Empty String
5. 'A' : Abort
6. 'E' : Error
If the response contains one amongst the first four response status then it implies that the BAPI was successful. If the response contains one amongst the last two response then the BAPI failed. If the BAPI "RETURN" parameter is of not of type ABAP structure rather of type ABAP table, a empty table is also considered as successful execution result.
In case of a successful execution the BAPI function module "BAPI_TRANSACTION_COMMIT" is called within the same context to trigger the commit of the BAPI. In case of a failure the BAPI function module "BAPI_TRANSACTION_ROLLBACK" is executed by RFC Adapter which rolls back the changes.</i> -
Could anyone just possibly tell me about BAPI'S and BADI'S in brief?
Hi all,
Could anyone just possibly tell me about BAPI'S and BADI'S in brief?
Regards in advance,
Sanjeev K.V.BAPI-
step by step
http://www.sapgenie.com/abap/bapi/example.htm
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
www.sappoint.com/abap/bapiintro.pdf
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
BAPI
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
u can check the below the material also
what is BAPI?
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
The following standardized BAPIs are provided:
Reading instances of SAP business objects
GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
Create( ) and CreateFromData! ( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( )
The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
Example Code
U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
U can find these parameters for a particular condition type in table KONV.
*& Form saveTransactionJOCR
text
--> p1 text
<-- p2 text
FORM saveTransactionJOCR .
data: salesdocument like BAPIVBELN-VBELN,
order_header_inx like bapisdh1x,
order_header_in like bapisdh1,
return type standard table of bapiret2 with header line,
conditions_in type standard table of bapicond with header line,
conditions_inx type standard table of bapicondx with header line,
logic_switch like BAPISDLS,
step_nr like conditions_in-cond_st_no,
item_nr like conditions_in-itm_number,
cond_count like conditions_in-cond_count,
cond_type like conditions_in-cond_type.
salesdocument = wa_order_information-VBELN.
LOGIC_SWITCH-COND_HANDL = 'X'.
order_header_inx-updateflag = 'U'.
conditions
clear conditions_in[].
clear conditions_inx[].
clear: step_nr,
item_nr,
cond_count,
cond_type.
step_nr = '710'.
item_nr = '000000'.
cond_count = '01'.
cond_type = 'ZCP2'.
CONDITIONS_IN-ITM_NUMBER = item_nr.
conditions_in-cond_st_no = step_nr.
CONDITIONS_IN-COND_COUNT = cond_count.
CONDITIONS_IN-COND_TYPE = cond_type.
CONDITIONS_IN-COND_VALUE = 666.
CONDITIONS_IN-CURRENCY = 'EUR'.
append conditions_in.
CONDITIONS_INX-ITM_NUMBER = item_nr.
conditions_inx-cond_st_no = step_nr.
CONDITIONS_INX-COND_COUNT = cond_count.
CONDITIONS_INX-COND_TYPE = cond_type.
CONDITIONS_INX-UPDATEFLAG = 'U'.
CONDITIONS_INX-COND_VALUE = 'X'.
CONDITIONS_INX-CURRENCY = 'X'.
append conditions_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = salesdocument
ORDER_HEADER_IN = order_header_in
ORDER_HEADER_INX = order_header_inx
LOGIC_SWITCH = logic_switch
TABLES
RETURN = return
CONDITIONS_IN = conditions_in
CONDITIONS_INX = conditions_inx
if return-type ne 'E'.
commit work and wait.
endif.
ENDFORM. " saveTransactionJOCR
Bdc to Bapi
The steps to be followed are :
1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
[for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
2. Create a Z program and call the BAPi (same as a Funtion module call).
2. Now, if you see this BAPi, it has
-> Importing structures.
eg: SALESDOCUMENT: this will take the Sales order header data as input.
-> Tables parameters:
eg: ORDER_ITEM_IN: this will take the line item data as input.
Note :
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data
Possible UPDATEFLAGS:
U = change
D = delete
I = add
Example
1. Delete the whole order
2. Delete order items
3. Change the order
4. Change the configuration
Notes
1. Minimum entry:
You must enter the order number in the SALESDOCUMENT structure.
You must always enter key fields for changes.
You must always specify the update indicator in the ORDER_HEADER_INX.
2. Commit control:
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
For further details... refer to the Function Module documentation for the BAPi.
Bapi to VB(Visual Basic)
Long back I had used the following flow structure to acheive the same.
Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
You need to have com4abap.exe
If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.
else refer OSS note 419822 for installation of com4abap
after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
for setting up com4abap and rfc destination please refer to the documentation for com4abap.
Invoke NEW DCOM session
call function 'BEGIN_COM_SESSION'
exporting
service_dest = service_dest "(this will be a RFC destination created in SM59)
importing
worker_dest = worker_dest
exceptions
connect_to_dcom_service_failed = 1
connect_to_dcom_worker_failed = 2
others = 3.
call function 'create_com_instance' destination worker_dest
exporting
clsid = g_c_clsid
typelib = g_c_typelib
importing
instid = g_f_oid
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
call function 'com_invoke' destination worker_dest
exporting
%instid = g_f_oid
%method = 'UpdatePDF'
sntemp = g_v_const_filent
snsysid = sy-sysid
snflag = 'N'
tables
rssaptable = g_t_pdfdetail1
%return = g_t_pdfdetail1 "t_test
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
then close the com session , using
FM delete_com_instance
FM END_COM_SESSION
Reward if u find useful
Regards
Nagesh.Paruchuri -
Is there any BAPI returning the affected organisational units to users?
Dear all,
I would like to ask a question about organizational units. Whenever I want to affect a user to a given unit I
use PPOME transaction. If I want to do this in ABAP level I use the function module RH_RELATION_WRITE.
I would like to know, is there any BAPI returning the affected organizational unit to a given user?
Thanks in advance,
Kind Regards,
DariyooshAlberto Sesma wrote:
You can use Function Module RH_STRUC_GET
>
>
> CALL FUNCTION 'RH_STRUC_GET'
> EXPORTING
> ACT_OTYPE = 'US'
> ACT_OBJID = user_name
> ACT_WEGID = 'US_CP_O'
> TABLES
> RESULT_TAB = LT_RESULT_TAB.
>
>
> You will get the related org units in LT_RESULT_TAB. There are other two table parameters in that function module that you may find useful.
>
> If the function does not return any valid data you may try with other values for WEGID. You will find all the possible evaluation paths in transaction OOAW.
>
> Kind regards
Dear Alberto,
Thank you very much for your answer. I didn't know this FM and it solved my problem.
For those who may be intered here is exactly I proceed. Suppose that in the table HRP1000 you have an
structure (type S) with ObjID = 50000342 and you wish to have the SapUserID of the affected persons.
DATA:
affected_users TYPE STANDARD TABLE OF swhactor,
user LIKE LINE OF affected_users.
START-OF-SELECTION.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'S'
act_objid = '50000342'
act_wegid = 'A008'
act_plvar = '01'
act_begda = sy-datum
act_endda = sy-datum
act_tdepth = 0
TABLES
result_tab = affected_users
EXCEPTIONS
NO_PLVAR_FOUND = 1
NO_ENTRY_FOUND = 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.
LOOP AT affected_users INTO user.
WRITE: / user-objid.
ENDLOOP.
Also in transaction OOAW we can have all possible values for the third argument of the module function (act_wegid).
For those who are interested, here are a few among many possible values which seem to be intesting for my
problem.
DFPS_DG1----
Organizational Unit of User
DFPS_DG3----
All Org. Units Above a User
ORGAS----
Closest Organizational Unit and structure
ORGASS----
Closest Organizational Unit and structure
PPLEORG -
Organizational unit of an employee or position
SAP_ORGP----
Organizational assignments of a user/person
SAP_USOG----
Organizational Assignments of a User
SAP_US_S----
Positions and Personnel Number of a User
US_S_S_C----
All positions and jobs of a user
WFM_ORGU----
Organizational Assignment of User
WF_ORGUN----
Organizational unit of a user/person (module id Ben./Pers.)
For example, let's say we have a userid named MYUSER01 and we would like to find all structures to which the user
is affected. Here is how I proceed.
DATA:
itab_user_structures TYPE STANDARD TABLE OF swhactor,
row_user_structures LIKE LINE OF itab_user_structures.
START-OF-SELECTION.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'US'
act_objid = 'MYUSER01'
act_wegid = 'US_S_S_C'
act_plvar = '01'
act_begda = sy-datum
act_endda = sy-datum
act_tdepth = 0
TABLES
result_tab = itab_user_structures
EXCEPTIONS
NO_PLVAR_FOUND = 1
NO_ENTRY_FOUND = 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.
LOOP AT itab_user_structures INTO row_user_structures.
WRITE: / row_user_structures-objid.
ENDLOOP.
Thank you very much for your help.
Kind Regards,
Dariyoosh -
Error in BAPI RETURN for Service Contract
Hi,
I get an error in the BAPI Return for the Uploading the Service Contracts by LSMW. The Error Message is E BS No status object is available for &.Also want to know can we upload multiple line of header text for a Contract by this BAPI. If so then how would I do this , as the BAPI structure BAPISDTEXT has textline upto 132 characters. And I am take only one file in LSMW where the header & details come alongwith text. Or could also tell me the file structure of for the data upload. The legacy system sends multiple text in the header for a Contract.For Eg.
Header1 Detail1 Text1
HEader1 Detail2 Text2
Header1 Detail3 Text3
So I would need this text1TEXT2text3 in the Header Text of the Contracts. Or do I need the change the file structure. Many thanks for your time and help.Thanks Nablan, I could do that for multiple header coming in file. But I have a question for you on BAdI ALM_ME_006_GOODSMVT. I have implemented this BAdI , and this BAdI is called by a function Module ALM_MEREP_006_CREATE. When I test this FM giving the Material , Orderid and Movement type entries, this BAdI is triggered when giving a breakpoint. I've given this code for changing the movement type to 961. Cause the stanadrd scenario does not maintain Movement type 961 in Mobile Asset Management. The Movement type 961 for unplanned Materials comes to SAP and changes to 261 as maiantained by TCOKO table. To bypass this & retain the movement type 961 in SAP I'm using this BAdI. Currently this is what I'm doing and am stuck in the method interface how do I call the method.
method IF_EX_ALM_ME_006_GOODSMVT~CREATE .
break-point.
*DATA : i_ce_goodsmovement TYPE REFERENCE
ALM_ME_CUSTOMER_ENHANCEMENT.
DATA : lr_badi_goods_movement TYPE REF TO if_ex_alm_me_006_goodsmvt.
DATA : ls_user_data TYPE ALM_ME_USER_DATA-USERID.
*DATA : goods_movement TYPE ALM_ME_MATERIAL_MOVEMENT.
CALL METHOD lr_badi_goods_movement->create
EXPORTING
ce_goodsmovement = ce_goodsmovement
IMPORTING
user_data = ls_user_data
custom_user_data = ls_ce_user_data
goods_movement = goods_movement
changing
return = return[].
CALL FUNCTION 'ALM_ME_COMMIT_OR_ROLLBACK'
TABLES
return = return.
endmethod.
Please help me to get the data in this method. How do I call this. -
haven't been around in a while, so I thought I'd stir up some comments with a suggestion for a new feature in Java, which I'm sure has been suggested at some point, but I can't remember seeing it talked about, so here goes:
Multiple Return Types:
public String, int getStateInfo(String abbrev) {
if("nj".equalsIgnoreCase(abbrev)) {
return "New Jersey", 11408042;
// ... and other states...
return null, -1;
String name, int population = getStateInfo("nj");
System.out.println("The population of " + name + " is " + population + ".");Yes yes, I know. Create a StateInfo object with the fields needed. Still, I think that could be interesting.apart from it getting ugly with more than twoparameters
What? How is this ugly? ;-)
public String, int, String, Color, String, String
getStateInfo(String abbrev) {
return name, population, stateFlower, stateColor,
or, stateAnimal, governorsName;
there no indication on what the return valuesrepresent.
Well, I guees the API docs would have to speak for
themselves. Or better method naming... In that
sense, it's no different then now. I could write a
method "getStateName()" and return totally different.
public String, int getStateNameAndPopulation(String
abbrev) {...
I used to like "tuples" when I studied The Tom Programming Language (that's how he calls them), as every CS student is a bit of a "featurist"... Now that I came to develop 40 hours a week and to love Java's simple and powerful expressiveness, I tend to find such constructs overly ugly to be avoided as possible... a matter of personal taste, too, I suppose... -
How can I get rid of a type generated by the Data/Services return type wizard?
Hi All,
I have a JSON service that returns an object called "error". The Data/Services "Configure Return Type" wizard automatically turned this into a class "Error".
However, this caused over a hundred errors to show up inside the generated classes, "Call to a possibly undefined method Error." That's because of lines like this:
throw new Error(propertyName + " is not a data property of entity Agreements");
It's trying to throw a regular "Error" object, but now that there's an "Error" class in the same package, that is taking precedence--and that Error object doesn't have a constructor with a single parameter. At least, that's what I think is going on.
I tried to fix it by deleting _ErrorEntityMetadata.as, _Super_Error.as, and Error.as from the valueObjects package. I then opened the FML file and deleted the definition for the entity "Error" and every reference to the Error entity (class) in my FML file.
I then changed my JSON service so that it returns an object called "serviceError" instead of just "error".
But, whenever I re-run the "Configure Return Type" wizard, it regenerates the Error class, even though I've deleted it from everywhere I can find it. That breaks my project completely! How can I end this and get Flash Builder to *stop* generating this type!
In the "Configure Return Type" wizard I very carefully inspected the type of every bit of data coming back to make sure none of them show up as type "Error." And they don't (as expected, since I changed the object's name to serviceError--now the type of that object is ServiceError.
-JoshI think you are facing this known issue https://bugs.adobe.com/jira/browse/FB-29770
Please vote it.
Thanks for the link--I just voted for it.
To avoid this, in the last page of "Configure Return Type", edit return type name to something else (You can also edit subnodes's name too in the wizard).
Actually, that's exactly what I saw doing; I apologize if that wasn't clear in my post.
I closed and restarted Flash Builder, and once I did that Flash Builder stopped generating the Error class. My guess is that the FML file, even though I had updated it (by deleting all references to the Error class), was cached in some fashion by Flash Builder, and restarting Flash Builder forced it to reread the FML file?
Additional point of clarification: my understanding is that the FML file stores all the metadata about the services that Flash Builder has been able to figure out so far, and when you run the Configure Return Type wizard, it will regenerate *every* type in the FML file, even if that type is not mentioned anywhere in the particular return value that you are working with.
Edited to provide additional thoughts on FML file. -
Regarding BAPI Return Parameter.
Hi All,
I want to create Bapi Return Message with Variable values like : ' Sales Order 1876738267 is not created, please try again.' and want to create a log of this after BAPI calling in Calling FM. How can I do this. Please guide me.
Thanks in Advance.Hi,
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
ORDER_HEADER_IN = sd_header
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = ' '
IMPORTING
SALESDOCUMENT = sd_doc_num
SOLD_TO_PARTY =
SHIP_TO_PARTY =
BILLING_PARTY =
RETURN = return_it
TABLES
ORDER_ITEMS_IN = itemin_it
ORDER_PARTNERS = partnr_it
ORDER_ITEMS_OUT =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CCARD =
ORDER_CFGS_BLOB =
ORDER_SCHEDULE_EX =
WRITE : / 'sy-subrc = ' , SY-SUBRC.
IF NOT SD_DOC_Num IS INITIAL.
WRITE : / 'Sales Order ' , SD_DOC_Num, 'Created'.
ELSE.
WRITE : / 'incorrect'.
WRITE : / RETURN_it-TYPE , RETURN_it-MESSAGE.
WRITE : / RETURN_it-LOG_NO, RETURN_it-LOG_MSG_NO,
RETURN_it-MESSAGE_V1.
ENDIF.
Hope this helps you.
Thanks,
Ruthra -
Developeing an interface program to upload the sales order data from legacy system to SAP using BAPI for Transaction VA01. explain me in detail?
Hi,
I am giving you the code for Purchase Order.
You can refer this code to create Sales Order.
The process is same...but The interface name changes here.
REPORT ZM_BAPI_PURCHDOCU_CREATE_01.
User defined structure for Creation of PO using BAPI
DATA: BEGIN OF IT_POMAIN OCCURS 0,
BUKRS(4), "cOMAPNY cODE
ESART(4), "Purchasing Document Type
ELIFN(10), "Vendor's account number
SPRAS(1), "Language Key
EKORG(4), "Purchasing Organization
BKGRP(3), "Purchasing group
WAERS(5), "Currency Key
RESWK(4), "Supplying Plant in case of stock transport order
EBELP(6), "Item Number of Purchasing Document
MATERIAL(18), "Material Number
EWERK(4), "Plant
LGORT_D(4), "Storage location
MATKL(9), "Material group
BSTMG(13), "Purchase order quantity
BSTME(3), "Order unit
BAPICUREXT(28), "Currency amount for BAPIS (with 9 decimal places)
EEIND(10), "Delivery date
ETBDT(8), "Order date of schedule line
END OF IT_POMAIN,
Structures for PO Header and Tables for PO Item Data
WA_POHEADER TYPE BAPIMEPOHEADER,
WA_POHEADERX TYPE BAPIMEPOHEADERX,
IT_ITEM TYPE STANDARD TABLE OF BAPIMEPOITEM WITH HEADER LINE,
IT_ITEMX TYPE STANDARD TABLE OF BAPIMEPOITEMX WITH HEADER LINE,
IT_SCHEDULE TYPE STANDARD TABLE OF BAPIMEPOSCHEDULE WITH HEADER LINE,
IT_SCHEDULEX TYPE STANDARD TABLE OF BAPIMEPOSCHEDULX WITH HEADER LINE,
******Bapi return table for Messages...
IT_RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
Designing Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS: P_FILE TYPE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
AT LINE SELECTION to give Value request for File Name p_file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM GET_F4.
START OF SELECTION
START-OF-SELECTION.
DATA: LV_INFILE TYPE STRING.
LV_INFILE = P_FILE.
Function Module to Upload Data from Flalt file to Internal Table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = LV_INFILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
tables
data_tab = IT_POMAIN
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
PERFORM POPULATE_BAPISTRUCT. " Populating Bapi structures
PERFORM PO_CREATE. " Creating PO using BAPI
ENDIF.
END OF SELECTION
END-OF-SELECTION.
PERFORM GET_ERROR. " Getting Error Records
*& Form GET_F4
Subroutine to get Flat File Name
form GET_F4 .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE.
endform. " GET_F4
*& Form POPULATE_BAPISTRUCT
Subroutine to Populate BAPI PO Header & Item Structures
form POPULATE_BAPISTRUCT .
READ TABLE IT_POMAIN INDEX SY-TABIX.
Populating BAPI Header Data
WA_POHEADER-COMP_CODE = IT_POMAIN-BUKRS.
WA_POHEADER-DOC_TYPE = IT_POMAIN-ESART.
WA_POHEADER-VENDOR = IT_POMAIN-ELIFN.
WA_POHEADER-LANGU = IT_POMAIN-SPRAS.
WA_POHEADER-PURCH_ORG = IT_POMAIN-EKORG.
WA_POHEADER-PUR_GROUP = IT_POMAIN-BKGRP.
WA_POHEADER-CURRENCY = IT_POMAIN-WAERS.
WA_POHEADER-SUPPL_PLNT = IT_POMAIN-RESWK.
Populating BAPI Header X Data
WA_POHEADERX-COMP_CODE = 'X'.
WA_POHEADERX-DOC_TYPE = 'X'.
WA_POHEADERX-VENDOR = 'X'.
WA_POHEADERX-LANGU = 'X'.
WA_POHEADERX-PURCH_ORG = 'X'.
WA_POHEADERX-PUR_GROUP = 'X'.
WA_POHEADERX-CURRENCY = 'X'.
WA_POHEADERX-SUPPL_PLNT = 'X'.
Populating BAPI Item Data
IT_ITEM-PO_ITEM = IT_POMAIN-EBELP.
IT_ITEM-MATERIAL = IT_POMAIN-MATERIAL.
IT_ITEM-PLANT = IT_POMAIN-EWERK.
IT_ITEM-STGE_LOC = IT_POMAIN-LGORT_D.
IT_ITEM-MATL_GROUP = IT_POMAIN-MATKL.
IT_ITEM-QUANTITY = IT_POMAIN-BSTMG.
IT_ITEM-PO_UNIT = IT_POMAIN-BSTME.
IT_ITEM-NET_PRICE = IT_POMAIN-BAPICUREXT.
APPEND IT_ITEM.
Populating BAPI Item X Data
IT_ITEMX-PO_ITEM = IT_POMAIN-EBELP.
IT_ITEMX-MATERIAL = 'X'.
IT_ITEMX-PLANT = 'X'.
IT_ITEMX-STGE_LOC = 'X'.
IT_ITEMX-MATL_GROUP = 'X'.
IT_ITEMX-QUANTITY = 'X'.
IT_ITEMX-PO_UNIT = 'X'.
IT_ITEMX-NET_PRICE = 'X'.
APPEND IT_ITEMX.
IT_SCHEDULE-PO_ITEM = IT_POMAIN-EBELP.
IT_SCHEDULE-DELIVERY_DATE = IT_POMAIN-EEIND.
IT_SCHEDULE-PO_DATE = IT_POMAIN-ETBDT.
APPEND IT_SCHEDULE.
IT_SCHEDULEX-PO_ITEM = IT_POMAIN-EBELP.
IT_SCHEDULEX-DELIVERY_DATE = 'X'.
IT_SCHEDULEX-PO_DATE = 'X'.
APPEND IT_SCHEDULEX.
endform. " POPULATE_BAPISTRUCT
*& Form PO_CREATE
Subroutine to Create PO using exsting BAPI FM -- BAPI_PO_CREATE
form PO_CREATE .
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = WA_POHEADER
POHEADERX = WA_POHEADERX
IMPORTING
EXPPURCHASEORDER =
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = IT_RETURN
POITEM = IT_ITEM
POITEMX = IT_ITEMX
POSCHEDULE = IT_SCHEDULE
POSCHEDULEX = IT_SCHEDULEX.
APPEND IT_RETURN.
endform. " PO_CREATE
*& Form GET_ERROR
Subroutine for Error Handling using Bapi return structure
and update the databse using BAPI_TRANSACTION_COMMIT
form GET_ERROR .
READ TABLE IT_RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC <> 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
LOOP AT IT_RETURN.
WRITE:/ IT_RETURN-TYPE,
IT_RETURN-MESSAGE.
ENDLOOP.
ELSE.
LOOP AT IT_RETURN.
WRITE:/ IT_RETURN-TYPE,
IT_RETURN-MESSAGE.
ENDLOOP.
ENDIF.
endform. " GET_ERROR
Regards
Sandeep Reddy -
Should/does -MyInterface give MyInterface return types?
The variance-overview.pdf says that List<-E> has Object as the return type of the get method. If this is true, I'm disappointed. I'd expect the following to work quite happily: List<-List<*>> myList = buildList();
List<*> elt1 = myList.get(0);There's no obvious reason why Object should be a supertype of List.I'm still a bit fuzzy about contravariance, but it all depends on what your buildList() method returns. I think this is all legal code:
List<Object> list1 = new ArrayList<Object>();
List<List<*>> list2 = new ArrayList<List<*>>();
list1.add (new Object());
list2.add (new ArrayList<Integer>());
List<-List<*>> list3;
list3 = list2;
list3 = list1;
Object o = list3.get(0); // o is not a List!Either of list1, list2 or list3 will accept list.add(new ArrayList<Integer>()) - however at the price that nothing can be guaranteed about the type of the contents of the array (in the second case, the list is only guaranteed to contain Object).
What you want is for your buildList() method to return List<+List<*>>, the variant case (since you are reading from it).
List<ArrayList<*>> list1 = new ArrayList<ArrayList<*>>();
List<List<*>> list2 = new ArrayList<List<*>>();
list1.add (new ArrayList<Integer>());
list2.add (new ArrayList<Integer>());
List<+List<*>> list3;
list3 = list2;
list3 = list1;
List<*> o = list3.get(0); // o is a List -
How to know return type in Web service
{color:#0000ff}I am writing a web service client application. After invoking the service it gets the result as SOAP massage. But i need to know the return type also. How can i do that?
{color}
here is the response obtained from web service after invoking a subtract method, it is giving correct value but doesn't give tye of value.
<ns:SubtractResponse xmlns:ns="http://example.ws"><ns:return>81</ns:return></ns:SubtractResponse>View WSDL(Web Service Description Language) file of the web service. Normally WSDL file of any web service can be referenced by appending "wsdl" at the end of web service URL. e.g. http://www.abs.com/mywebservice/invokewebservice?wsdl
Shazzad wrote:
After invoking the service it gets the result as SOAP massage. But i need to know the return type also. How can i do that?WSDL file for a web service contains all information regarding the web service like types, message, portType, binding, service etc. Types section have schema definitions of all messages which are being used in web service. here you can find everything about all elements, fields for all the messages in the WebService including type of the values.
You can find more about WSDL on Sun and Google very easily.
Hope this will help.
Thanks,
Tejas -
About bapi with help of example
about bapi with help of example plz dont give links.
With the correct customizing (order types, etc...) the following BAPI will create a PM order for you.
Naturally the master data is also required to be created in SAP (Technical objects, Work places, etc...)
*& Report Z_BAPI_ALM_ORDER_MAINTAIN_TEST *
REPORT z_bapi_alm_order_maintain_test.
TABLES: mara,
resb. "anyagfoglalások táblája
DATA: it_methods LIKE STANDARD TABLE OF bapi_alm_order_method,
wa_methods LIKE LINE OF it_methods.
DATA: it_header LIKE STANDARD TABLE OF bapi_alm_order_headers_i,
wa_header LIKE LINE OF it_header.
DATA: it_operation LIKE STANDARD TABLE OF bapi_alm_order_operation,
wa_operation LIKE LINE OF it_operation.
DATA: it_component LIKE STANDARD TABLE OF bapi_alm_order_component,
wa_component LIKE LINE OF it_component.
DATA: it_component_up LIKE
STANDARD TABLE OF bapi_alm_order_component_up,
wa_component_up LIKE LINE OF it_component_up.
DATA: et_numbers LIKE STANDARD TABLE OF bapi_alm_numbers,
wa_numbers LIKE LINE OF et_numbers.
DATA: et_extension_in LIKE STANDARD TABLE OF bapiparex,
wa_extension_in LIKE LINE OF et_extension_in.
DATA: et_return LIKE STANDARD TABLE OF bapiret2,
wa_return LIKE LINE OF et_return.
DATA: it_resb LIKE STANDARD TABLE OF resb,
wa_resb LIKE LINE OF it_resb.
DATA: lv_commit TYPE i.
PARAMETERS: p_test AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_create RADIOBUTTON GROUP rg1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(30) text-rcr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_change RADIOBUTTON GROUP rg1.
SELECTION-SCREEN COMMENT 4(30) text-rch.
PARAMETERS: p_aufnr LIKE aufk-aufnr MEMORY ID anr.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
PARAMETERS: p_compon AS CHECKBOX DEFAULT 'X'.
PARAMETERS: p_partn AS CHECKBOX DEFAULT 'X'.
START-OF-SELECTION.
IF p_aufnr IS INITIAL.
MOVE '007321002921' TO p_aufnr.
ENDIF.
PERFORM it_methods_fill.
PERFORM it_header_fill.
PERFORM it_operation_fill.
IF p_compon = 'X'.
PERFORM it_component_fill.
ENDIF.
REFRESH et_numbers.
break zaladev.
CALL FUNCTION 'Z_BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = it_methods
it_header = it_header
* IT_HEADER_UP =
* IT_HEADER_SRV =
* IT_HEADER_SRV_UP =
* IT_USERSTATUS =
* IT_PARTNER =
* IT_PARTNER_UP =
it_operation = it_operation
* IT_OPERATION_UP =
* IT_RELATION =
* IT_RELATION_UP =
it_component = it_component
it_component_up = it_component_up
* IT_TEXT = it_text
* IT_TEXT_LINES =
extension_in = et_extension_in
et_return = et_return
et_numbers = et_numbers.
CLEAR lv_commit.
LOOP AT et_return INTO wa_return.
IF wa_return-type = 'S' AND NOT wa_return-message_v2 IS INITIAL.
IF p_test IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
lv_commit = 1.
ENDIF.
EXIT.
ENDIF.
ENDLOOP.
IF lv_commit IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
break zaladev.
*& Form it_methods_fill
* text
* --> p1 text
* <-- p2 text
FORM it_methods_fill.
IF p_create = 'X'. "LÉTREHOZÁS
MOVE '1' TO wa_methods-refnumber.
MOVE 'HEADER' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%00000000001' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE '1' TO wa_methods-refnumber.
MOVE 'OPERATION' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%000000000010010' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE '2' TO wa_methods-refnumber.
MOVE 'OPERATION' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%000000000010020' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE '3' TO wa_methods-refnumber.
MOVE 'OPERATION' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%0000000000100200010' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE '4' TO wa_methods-refnumber.
MOVE 'OPERATION' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%0000000000100200020' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
IF p_compon = 'X'.
MOVE 1 TO wa_methods-refnumber.
MOVE 'COMPONENT' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%00000000001' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE 2 TO wa_methods-refnumber.
MOVE 'COMPONENT' TO wa_methods-objecttype.
MOVE 'CREATE' TO wa_methods-method.
MOVE '%00000000001' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
ENDIF.
MOVE '1' TO wa_methods-refnumber.
MOVE '' TO wa_methods-objecttype.
MOVE 'SAVE' TO wa_methods-method.
MOVE '%00000000001' TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
ELSE. "MÓDOSÍTÁS
MOVE '1' TO wa_methods-refnumber.
MOVE 'HEADER' TO wa_methods-objecttype.
MOVE 'CHANGE' TO wa_methods-method.
MOVE p_aufnr TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
IF p_compon = 'X'.
MOVE 1 TO wa_methods-refnumber.
MOVE 'COMPONENT' TO wa_methods-objecttype.
MOVE 'CHANGE' TO wa_methods-method.
MOVE p_aufnr TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE 2 TO wa_methods-refnumber.
MOVE 'COMPONENT' TO wa_methods-objecttype.
MOVE 'CHANGE' TO wa_methods-method.
MOVE p_aufnr TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
MOVE 3 TO wa_methods-refnumber.
MOVE 'COMPONENT' TO wa_methods-objecttype.
MOVE 'DELETE' TO wa_methods-method.
MOVE p_aufnr TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
ENDIF.
MOVE '1' TO wa_methods-refnumber.
MOVE '' TO wa_methods-objecttype.
MOVE 'SAVE' TO wa_methods-method.
MOVE p_aufnr TO wa_methods-objectkey.
APPEND wa_methods TO it_methods.
ENDIF.
ENDFORM. " it_methods_fill
*& Form it_header_fill
* text
* --> p1 text
* <-- p2 text
FORM it_header_fill .
IF p_create = 'X'. "LÉTREHOZÁS
MOVE '%00000000001' TO wa_header-orderid.
MOVE 'D210' TO wa_header-order_type. "rendelésfajta
MOVE '2000' TO wa_header-planplant. "tervező gyár
MOVE '19' TO wa_header-mn_wk_ctr. "fel.munkahely
MOVE '2000' TO wa_header-plant. "fel.munkahely gyára
MOVE 'CUV-SZV-CSUR-ATEM-I...' TO wa_header-funct_loc. "műsz.hely
MOVE '' TO wa_header-equipment. "berendezés
MOVE '' TO wa_header-material. "anyagszám
* MOVE '' TO wa_header-LOC_WK_CTR. "fel.munkahely
* MOVE '' TO wa_header-LOC_COMP_CODE. "vállalat
* MOVE sy-datum TO wa_header-START_DATE. "kezdés dátuma
* MOVE sy-datum TO wa_header-FINISH_DATE. "befejezés dátuma
* MOVE '' TO wa_header-BASICSTART. "kezdés időpontja
* MOVE '' TO wa_header-BASIC_FIN. "befejezés időpontja
MOVE 'Teszt szöveg 1' TO wa_header-short_text. "szöveg
APPEND wa_header TO it_header.
ELSE. "MÓDOSÍTÁS
MOVE p_aufnr TO wa_header-orderid.
MOVE 'CUV-SZV-CSUR-ATEM-II..' TO wa_header-funct_loc. "műsz.hely
MOVE 'Teszt szöveg módosítva 2' TO wa_header-short_text. "szöveg
APPEND wa_header TO it_header.
ENDIF.
ENDFORM. " it_header_fill
*& Form it_operation_fill
* text
* --> p1 text
* <-- p2 text
FORM it_operation_fill .
IF p_create = 'X'. "LÉTREHOZÁS
MOVE 10 TO wa_operation-activity. "művelet
MOVE '' TO wa_operation-sub_activity. "al-művelet
MOVE 'PM01' TO wa_operation-control_key. "vezérlő kulcs
* MOVE '19' TO wa_operation-WORK_CNTR. "munkahely
* MOVE '2000' TO wa_operation-PLANT. "gyár
MOVE '' TO wa_operation-standard_text_key. "mintakulcs
MOVE 'Művelet leírása 1.sor' TO wa_operation-description."leírás
MOVE '' TO wa_operation-vendor_no. "szállító
* MOVE 3 TO wa_operation-quantity. "mennyiség
* MOVE 'KG' TO wa_operation-base_uom. "menny.egys.
* MOVE 500 TO wa_operation-PRICE. "ár
* MOVE 1 TO wa_operation-PRICE_UNIT. "áregység
* MOVE 'HUF' TO wa_operation-CURRENCY. "pénznem
* MOVE '' TO wa_operation-PERS_NO. "törzsszám
MOVE 10 TO wa_operation-work_activity. "művelet munkája
* MOVE 'KG' TO wa_operation-UN_WORK. "művelet munkája
MOVE 2 TO wa_operation-number_of_capacities. "szüks. kapacitás
APPEND wa_operation TO it_operation.
MOVE 20 TO wa_operation-activity. "művelet
MOVE '' TO wa_operation-sub_activity. "al-művelet
MOVE 'PM01' TO wa_operation-control_key. "vezérlő kulcs
* MOVE '19' TO wa_operation-WORK_CNTR. "munkahely
* MOVE '2000' TO wa_operation-PLANT. "gyár
MOVE '' TO wa_operation-standard_text_key. "mintakulcs
MOVE 'Művelet leírása 2.sor' TO wa_operation-description."leírás
MOVE '' TO wa_operation-vendor_no. "szállító
* MOVE 5 TO wa_operation-quantity. "mennyiség
* MOVE 'KG' TO wa_operation-base_uom. "menny.egys.
* MOVE 500 TO wa_operation-PRICE. "ár
* MOVE 1 TO wa_operation-PRICE_UNIT. "áregység
* MOVE 'HUF' TO wa_operation-CURRENCY. "pénznem
* MOVE '' TO wa_operation-PERS_NO. "törzsszám
MOVE 5 TO wa_operation-work_activity. "művelet munkája
* MOVE 'KG' TO wa_operation-UN_WORK. "művelet munkája
MOVE 1 TO wa_operation-number_of_capacities. "szüks. kapacitás
APPEND wa_operation TO it_operation.
MOVE 20 TO wa_operation-activity. "művelet
MOVE 10 TO wa_operation-sub_activity. "al-művelet
MOVE 'PM01' TO wa_operation-control_key. "vezérlő kulcs
* MOVE '19' TO wa_operation-WORK_CNTR. "munkahely
* MOVE '2000' TO wa_operation-PLANT. "gyár
MOVE '' TO wa_operation-standard_text_key. "mintakulcs
MOVE 'Alművelet leírása 2/1.sor' TO wa_operation-description."leírás
MOVE '' TO wa_operation-vendor_no. "szállító
* MOVE 5 TO wa_operation-quantity. "mennyiség
MOVE 'KG' TO wa_operation-base_uom. "menny.egys.
* MOVE 500 TO wa_operation-PRICE. "ár
* MOVE 1 TO wa_operation-PRICE_UNIT. "áregység
* MOVE 'HUF' TO wa_operation-CURRENCY. "pénznem
* MOVE '' TO wa_operation-PERS_NO. "törzsszám
MOVE 2 TO wa_operation-work_activity. "művelet munkája
* MOVE 'KG' TO wa_operation-UN_WORK. "művelet munkája
MOVE 1 TO wa_operation-number_of_capacities. "szüks. kapacitás
APPEND wa_operation TO it_operation.
MOVE 20 TO wa_operation-activity. "művelet
MOVE 20 TO wa_operation-sub_activity. "al-művelet
MOVE 'PM01' TO wa_operation-control_key. "vezérlő kulcs
* MOVE '19' TO wa_operation-WORK_CNTR. "munkahely
* MOVE '2000' TO wa_operation-PLANT. "gyár
MOVE '11' TO wa_operation-standard_text_key. "mintakulcs
MOVE 'Alművelet leírása 2/2.sor' TO wa_operation-description."leírás
MOVE '' TO wa_operation-vendor_no. "szállító
MOVE 5 TO wa_operation-quantity. "mennyiség
MOVE 'KG' TO wa_operation-base_uom. "menny.egys.
* MOVE 500 TO wa_operation-PRICE. "ár
* MOVE 1 TO wa_operation-PRICE_UNIT. "áregység
* MOVE 'HUF' TO wa_operation-CURRENCY. "pénznem
* MOVE '' TO wa_operation-PERS_NO. "törzsszám
MOVE 3 TO wa_operation-work_activity. "művelet munkája
* MOVE 'KG' TO wa_operation-UN_WORK. "művelet munkája
MOVE 1 TO wa_operation-number_of_capacities. "szüks. kapacitás
APPEND wa_operation TO it_operation.
ELSE. "MÓDOSÍTÁS
ENDIF.
ENDFORM. " it_operation_fill
*& Form it_component_fill
* text
* --> p1 text
* <-- p2 text
FORM it_component_fill.
IF p_create = 'X'. "LÉTREHOZÁS
MOVE '0010' TO wa_component-item_number.
MOVE '000000023336110300' TO wa_component-material. "cikkszám
MOVE '2000' TO wa_component-plant. "gyár
MOVE '0001' TO wa_component-stge_loc. "raktár
MOVE 1 TO wa_component-requirement_quantity. "felh.m.
MOVE '0020' TO wa_component-activity. "művelet
APPEND wa_component TO it_component.
MOVE '0020' TO wa_component-item_number.
MOVE '000000095000001900' TO wa_component-material. "cikkszám
MOVE '2000' TO wa_component-plant. "gyár
MOVE '' TO wa_component-stge_loc. "raktár
MOVE 2 TO wa_component-requirement_quantity. "felh.m.
MOVE '0020' TO wa_component-activity. "művelet
MOVE 'N' TO wa_component-item_cat. "tételtípus
MOVE '0000000014' TO wa_component-vendor_no. "szállító
APPEND wa_component TO it_component.
ELSE. "MÓDOSÍTÁS
SELECT * FROM resb
INTO TABLE it_resb
WHERE aufnr EQ p_aufnr.
IF sy-subrc = 0.
READ TABLE it_resb INTO wa_resb
WITH KEY aufnr = p_aufnr.
MOVE wa_resb-rsnum TO wa_component-reserv_no.
ELSE.
CLEAR wa_component-reserv_no.
ENDIF.
MOVE '0010' TO wa_component-item_number.
MOVE '0001' TO wa_component-res_item.
* MOVE '000000023336110400' TO wa_component-material. "cikkszám
* MOVE '2000' TO wa_component-plant. "gyár
* MOVE '0001' TO wa_component-stge_loc. "raktár
MOVE 6 TO wa_component-requirement_quantity. "felh.m.
MOVE '0020' TO wa_component-activity. "művelet
APPEND wa_component TO it_component.
MOVE 'X' TO wa_component_up-requirement_quantity.
MOVE 'X' TO wa_component_up-activity.
APPEND wa_component_up TO it_component_up.
MOVE '0020' TO wa_component-item_number.
MOVE '0002' TO wa_component-res_item.
* MOVE '000000095000001800' TO wa_component-material. "cikkszám
* MOVE '2000' TO wa_component-plant. "gyár
* MOVE '0001' TO wa_component-stge_loc. "raktár
MOVE 6 TO wa_component-requirement_quantity. "felh.m.
MOVE '0010' TO wa_component-activity. "művelet
APPEND wa_component TO it_component.
* MOVE 'X' TO wa_component_up-material.
MOVE 'X' TO wa_component_up-requirement_quantity.
MOVE 'X' TO wa_component_up-activity.
APPEND wa_component_up TO it_component_up.
MOVE '0030' TO wa_component-item_number.
MOVE '000000023336110400' TO wa_component-material. "cikkszám
MOVE '2000' TO wa_component-plant. "gyár
MOVE '0001' TO wa_component-stge_loc. "raktár
MOVE 7 TO wa_component-requirement_quantity. "felh.m.
MOVE '0020' TO wa_component-activity. "művelet
APPEND wa_component TO it_component.
ENDIF.
ENDFORM. " it_component_fill -
ODSI support for return type "PL/SQL TABLE"?
Hello!
We are trying to connect our ODSI to an Oracle function with return type "PL/SQL TABLE". The ODSI "wizard" (used to create the physical data service) seems to understand the interface during creation, but when executed it fails. The ODSI server complains about wrong type (PLS-00382: expression is of wrong type) when we execute it from the "test tab".
The function's metadata is looks like this:
<params xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:pn1="ld:physical/rekondis/CALC_DEBITING" >
<param name="RETURN_VALUE" kind="return" xqueryType="pn1:RETURN_VALUE_ROW" nativeTypeCode="1111" nativeType="PL/SQL TABLE"/>
<param name="PIN_CASE_ID" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
<param name="PIN_ACTION_CODE" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
<param name="PI_AD_NAME" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
</params>
Any ideas how we can make this work!? Or is this not even supported in ODSI 10.3?
Thanks!
// MikaelPlease refer to the documentation - http://download.oracle.com/docs/cd/E13162_01/odsi/docs10gr3/datasrvc/Create%20Physical%20Data%20Services%20from%20Stored%20Procedures.html
-
JSP: can't change return type
I'm using JDeveloper2.0 to deploy JSP functions which return
some value, of course. However, if I change my mind and decide
I want to return a string instead of an int or vice versa, I
have to rename the JSP. The first return type I chose seems to
be married to my JSP and I can't get rid of it even if I remove
it from the workspace or remove the funtion from the database.
If I rename the JSP to something else, it works of course
because it thinks this is a completely new JSP. But if I then
name it back to the original name, it still remembers my old
return type.
This very irritating and not acceptable because I can't go about
renaming JSP's which have already been defined in our design
docs.
Anybody seen this?
K Uthoff
nullKristi,
I am assuming you mean Java Stored Procedures by JSP and not Java
ServerPages.
This does appear to be the case, although I was able to get the
Deployment Profile wizard to recognize the new return type if I
cancelled out of JDeveloper and restarted it.
This bug appears to be fixed in JDeveloper 3.0.
Laura
Kristi Uthoff (guest) wrote:
: I'm using JDeveloper2.0 to deploy JSP functions which return
: some value, of course. However, if I change my mind and decide
: I want to return a string instead of an int or vice versa, I
: have to rename the JSP. The first return type I chose seems to
: be married to my JSP and I can't get rid of it even if I remove
: it from the workspace or remove the funtion from the database.
: If I rename the JSP to something else, it works of course
: because it thinks this is a completely new JSP. But if I then
: name it back to the original name, it still remembers my old
: return type.
: This very irritating and not acceptable because I can't go
about
: renaming JSP's which have already been defined in our design
: docs.
: Anybody seen this?
: K Uthoff
null
Maybe you are looking for
-
Itouch apps appear on computer screen greyed out
When I plug my iTouch (4) into my (newly upgraded) iTunes program and click on "my iTouch" it shows the apps on the iTouch but they're greyed out and I have no access to them. The only option I had was to download new copies of my apps from the iTune
-
What does the field "Version of the Reporting Component" in the table RSZC
Hi Experts, Was wondering if any of you have the answer to the following: The table RSZCOMPDIR stores details of the queries. Now the field "Version of the Reporting Component" in this table contains many different values viz. 0, 1
-
Lightroom 3 won't recognize RAW downloads from canon 6D
HELP! I just purchased a canon 6D, and took some RAW test shots. I wanted to see what they looked like on the monitor, tried to download them, but it doesn't recognize the file. I think the version of lightroom I have isn't "new" enough to manage tho
-
Fireworks CS4 Rounded Corner properties missing
Until recently, I am pretty sure that I could change "roundness" of a Rounded Rectangle object in the standard properties panel. But for last few weeks that option is no longer available. See screen shot below. In the Fireworks user guide, it suggest
-
I am connected to the Internet via a Netgear (wired) ADSL Modem Router DG632. Wanting to get my laptop online, I have been attempting, to no avail, to get a wireless system up and running. I purchased an AirPort Extreme, having been told in the Apple