ABAP Proxy Import Structure
ok. Guys and gals I have limited ABAP expierence and have a simple question around loops. I have an ABAP proxy setup that receives an XML file and stores the contents in the INPUT method. The two structures under Item I am working with are I_HEADER and I_ITEM.
I can access the values in I_HEADER with something like the following:
CLEAR w_header.
w_header-guid = v_header_guid.
w_header-description = input-I_HEADER-DESCRIPTION.
w_header-process_type = input-I_HEADER-PROCESS_TYPE.
w_header-posting_date = sy-datum.
now I currently have been testing the proxy with the following for my i_item structure. This is hard coded but I would like to import from the INPUT structure.
CLEAR w_item.
w_item-guid = v_item_guid.
w_item-parent = v_header_guid.
w_item-product = '00000000000000000000000000000000'.
w_item-description = 'Test Item Description'.
APPEND w_item TO i_item.
How would I setup my loop to read the I_ITEM-ITEM table and populate with the imported values instead of hard coded. For instance using this example I would need the values from I_ITEM-ITEM-DESCRIPTION and I_ITEM-ITEM-PRODUCT?
Thank You.
Hi Joe,
You have to use to loops one for header and another for Item details in that header something like this
loop at it_header into wa_header
loop at it_item into wa_tem
endloop.
endloop.
Similar Messages
-
Hi,
I have SAP server at sender side, XI is my middleware and two 3rd partyservers on the receiver side.
So,from SAP side data comes through proxy,I would generate a structure which contains the fields required to send the data to both the receivers.But few fields would used to send the data to one server and some fields to another server.
So, once the data is filled,there would be a segreation process internally writeen in proxy to segregate the data.
So, Now can i use the same structure for all the proxies i generate to send the data or should I generate different structures for each and every interface.
Thank you,
Kishore J.hi,
check the below links, so that u will get complete concept in abap proxies:
/people/sap.user72/blog/2005/12/13/integration-builders-through-proxy-server-part--2
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
/people/arulraja.ma/blog/2006/08/18/xi-reliable-messaging-150-eoio-in-abap-proxies
/people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
/people/sukumar.natarajan/blog/2007/01/07/how-to-raise-alerts-from-abap-proxy
/people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Proxy to File
/people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies - Activate Proxy
/people/siva.maranani/blog/2005/04/03/abap-server-proxies - ABAP Server Proxy
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Client Proxy
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - ABAP Proxy
http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/ba/f21a403233dd5fe10000000a155106/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/41e08c90-0201-0010-9197-d8774336ea78
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ae9874-109c-2910-f48a-e91f0cdd1c81
/people/sravya.talanki2/blog/2006/07/28/smarter-approach-for-coding-abap-proxies
reward points if helpful
regards
sreeni -
What is package structure for Client ABAP Proxy?
1. What is the package structure need to be followed for creating abap client proxy.
2. I read some where in the form, it need to be 4 levels. Why is it?
Thank you
Ganges LeavesHi
U hav to create a 4 level package structure for client ABAP proxy.
U can create ur on packages
1st level-structure package.
2nd level-main package.
3rd and 4th level-sub packages.
To the 4th level only u hav to create proxy.
The classes and code wil be automatically generated at the time of proxy creation.
I think the 4 level structure bcz while in r/3 everythin in integration builder like software component version and all wil be takin as different levels.
Also u can go through the weblogs in the above replies u got.
Regards
Victoria. -
Creation of package structure for ABAP proxy scenario
Hi All,
I have a doubt on package structure used for ABAP proxy scenario. What is the specific reason to create a four level package structure? Can some one please explain? Thanks in advance.
Regards,
Sudheer.Hi Sudheer,
Can you pls clarify what do you mean by 'four level package structure' ?
Are you referring to the ABAP structures that get created during creating the proxy by SPROXY transaction ? These structures get automatically created. We simply have to write the code using these structures.
Or do you mean the 'package' which is mandatory to create a transportable ABAP object ? i.e. transport from Development to Staging and then Production.
Regards, -
SAP ABAP Proxy - recursive data structure problem
Hi,
For our customer we try to bind SAP with GW Calendar using GW Web Services. We tried to generate ABAP Proxy from groupwise.wsdl file but there are problems: GW uses recursive data structures what ABAP Proxy can not use. Is there any simple solution to this problem?
Best regards
PawelAt least I don't have a clue about ABAP Proxy.
You are pretty much on your own unless someone
else has tried it.
Preston
>>> On Tuesday, August 03, 2010 at 8:26 AM,
pawelnowicki<[email protected]> wrote:
> Hi,
>
> For our customer we try to bind SAP with GW Calendar using GW Web
> Services. We tried to generate ABAP Proxy from groupwise.wsdl file but
> there are problems: GW uses recursive data structures what ABAP Proxy
> can not use. Is there any simple solution to this problem?
>
> Best regards
> Pawel -
ABAP Proxy : Modification in Structure
Hi Experts,
I have one query in ABAP Proxy. I had one customized table type as declared
DATA: ITAB TYPE ZABCD.
It is having line type as ZABCD_LINE.
This is just line type. Now I wanted to add 2 fields in same line type.
While using SE11 whenever I am trying to change the line type of it it, i am getting status message "Change using transaction SPROXY".
I am totally new in ABAP proxy. Can anybody will suggest me using SPROXY step by step how I can add the req. field in that line type?
Thanks,
NehaHello Neha,
SPROXY is the ABAP proxy generation transaction where you can create proxy class for any function module.
This structure is linked to proxy parameter so if you want to change anything you need to go to SPROXY and then change parameter over there as per your requirement and that will change the internal used structure.
In message interface you can select particular and double click that will take you to transaction where you can edit that object.
Hope this helps,
Thanks,
Augustin. -
ABAP proxy class - data structure
I generated a ABAP Proxy Class and the data structure I want to use is put automatically under item structure which has 0...unbounded type.
1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
2. If my source structure has only 3 level, and the target structure has more than 3 (including item), how to map it?
e.g.
Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
I need to map level 3 from my source to level 4 in target, but it didn't seem to work.
Thanks.--->1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
You can delete the proxy at Application Server.....make necessary changes at XI Message Interface and again generate the proxy...
-->Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
For this you need to make use of context change features of XI Mapping.
Regards, -
Proxy structures not getting populated in receiver ABAP proxy
hello
i am having HTTP-ABAP Proxy scenario where i am entering sales order information from HTTP and sending it to SAP CRM system. I am using ABAP receiver Proxy for getting the message.
But when i debugged the code of receiver proxy i couldn't found the structures being filled by the data. i checked in SXMB_MONI of CRM which was containing data into its payload but no data into the structures. actually i have generated proxy of the interface which uses external definitions as data type.
has anyone faced such problem before?
thanks in advance.
Regards
RajeevHi Rajeev,
There should not be any problem due to XSD u have used.Ur proxy is created sucessfully i guess?? There may be some discrepancy in ur code..
check the server proxy....may be helpful for u..
Server Proxy (Receiver Proxy)-
/people/siva.maranani/blog/2005/04/03/abap-server-proxies
File to ABAP Proxy
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
check the threads also...
problem in proxy?
Re: coding of Server proxy
Re: coding of Server proxy
regards
BILL -
Number of structures in package for ABAP proxy
Hey guys,
do we need 4 levels of structures in package for a simple ABAP proxy to file scenario,isn't there any inbuilt package which can be used(cant we jst use $TMP as it is )?
thanx
ahmadhi,
they (those structures) look like the messages interface that you created in the Integration repository
have a look at the data type (on which message interface is based on)
and this weblog
/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
the structure will have all the fields from the
data type
is it clearer now ?
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Consume web service in ABAP proxy with SOAP header
Hi Thomas ,
I am trying to consume web service in ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
Please see below code and please give some direction to fix the issue.
1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
2.Create Logical port
3.Create following program to call proxy
REPORT zproxy.
DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
ws_header TYPE REF TO if_wsprotocol_ws_header,
name TYPE string,
namespace TYPE string.
TRY.
CREATE OBJECT ref_stock
get WS_HEADER protocol
ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
set somehow header as iXML-DOM tree
DATA: ixml TYPE REF TO if_ixml,
xml_document TYPE REF TO if_ixml_document,
xml_root TYPE REF TO if_ixml_element,
xml_element TYPE REF TO if_ixml_element,
xml_node TYPE REF TO if_ixml_node.
DATA l_xstring TYPE xstring.
DATA l_string TYPE string.
FIELD-SYMBOLS <fs_xstring> TYPE xstring.
Additional Header:
CONCATENATE
'<soap:Header>'
'<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
'<s1:RegisteredUser>'
'<s1:UserID>[email protected]</s1:UserID>'
'<s1:Password>aaaaaaaa</s1:Password>'
'</s1:RegisteredUser></s1:LicenseInfo>'
'</soap:Header>' INTO l_string.
convert to xstring
l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
IF NOT l_string IS INITIAL.
create iXML DOM document from XML xstring
CALL FUNCTION 'SDIXML_XML_TO_DOM'
EXPORTING
xml = l_xstring
IMPORTING
document = xml_document
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
xml_root = xml_document->get_root_element( ).
xml_element ?= xml_root->get_first_child( ).
add header element by element to SOAP header
WHILE NOT xml_element IS INITIAL.
name = xml_element->get_name( ).
namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
IF NOT xml_element IS INITIAL.
ENDIF.
ws_header->set_request_header(
name = name
namespace = namespace
dom = xml_element ).
xml_element ?= xml_element->get_next( ).
ENDWHILE.
ENDIF.
ENDIF.
CATCH cx_ai_system_fault .
ENDTRY.
*Call soap body using abap proxy class.
DATA: get_quotes TYPE zzget_quotes_soap_out .
DATA: get_quotes1 TYPE zzget_quotes_soap_in .
get_quotes1-quote_ticker = 'GE'.
TRY.
CALL METHOD ref_stock->get_stock_quotes
EXPORTING
get_quotes1 = get_quotes1
IMPORTING
get_quotes = get_quotes.
CATCH cx_ai_system_fault .
CATCH cx_ai_application_fault .
ENDTRY.
4.It is throwing cx_ai_system_fault error.
SOAP details:
Input:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
<soap:Header>
<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
<s1:RegisteredUser>
<s1:UserID>[email protected]</s1:UserID>
<s1:Password>aaaaaaaa</s1:Password>
</s1:RegisteredUser>
</s1:LicenseInfo>
</soap:Header>
<soap:Body>
<tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
<tns:QuoteTicker>GE</tns:QuoteTicker>
</tns:GetQuotes>
</soap:Body>
</soap:Envelope>
Thanks,
Kavitha.Hi ,
Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
<a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
Thanks,
Kavitha. -
File to ABAP Proxy(ProductActivityNotification_In)
Hi All
I have to develop one scenario for Flat File to ABAP Proxy (ProductActivityNotification_In).
I am going to use Receiver File Adapter(to receive file in PI) and Reiver XI adapter(to send file to SNC proxy ProductActivityNotification_In)
I am new to XI please let me know how to approach to this solution.
What could be the design steps I need to consider?
Do I Need to use content conversion?
Can I use graphical mapping?
Thanks for your inputs.
Regards
Amol.Hey,
You need to import the SNC standard content in XI.
This will provide you with the Proxy interface.
Then you need to do certain settings on the SNC server.
R3 side
SLDCHECK
Use this transaction to access the SLD of XI.
SLDAPICUST
Create an entry for respective XI server
requires hostname, port username and ip.
Can have multiple enteries for different servers.
But you can check only one entry.
based on the entry that is checked, respective SLD API will be triggered from
SLDCHECK.
SM59 (T type connections).
To connect to the SLD you need 2 types of TCP/IP connections.
1)LCRSAPRFC:-
In this you require the gateway host(ip address) and gatewayservice(sapgw[system no.])
YOu also need to give Program ID.
Entry of corresponding Program ID must be maintained in SMGW.
IN SMGW Click GoTo->logged on Clients.
If entry is not there for corresponding XI.
Create a communication channel in XI, pointing to R3 and give a Program ID
in the channel. Once the channel is activated, corresponding Program ID wil
appear in SMGW.
2)SAPSLDAPI:-
In this case follow the same porcedure as for LCRSAPRFC.
As far as the Program ID is concerned te procedure mentioned above is for
Customized RFC's
The RFC destinations mentioned here are both standard RFC's
Hence for these two RFC's no need to Create Program ID's. you just need to
change the System ID of the Program ID.
Both these RFC's are maintained in the J2ee server of XI.
SPROXY.
In this transcation you can check the Proxies.
If the proxies are not activated (i.e. if the message interfaces are not active)
then you need to maintain one G type RFC destination pointing the resepctive XI server.
In the G tpye RFC destination give the Ip adress of the XI server in the target
host and set the path prefix as /rep.
Goto SPROXY->Goto->connection test-> click on the table SPROXSET.
In this table maintain enteries for ADDRESS_ONLY_FROM_SPROXSET and IFR_HTTP_DEST
The values corresponding to these enteries will be the G tpye RFC destination.
In order to connect R3 to the Integaration server you need to maintain H type
The default RFC is XI_INTEGRATIONSERVER. In you need to give the Target host entry as the
Ip address and Path Prefic as.../sap/XI/engine/?type=entry (this you can get from SXMB_ADM of XI)
You can also create the H type RFc of your own.
goto SXMB_ADM(r3) and open Integration engine configuration.
Goto edit->change global configuration and give the RFC dest name like this:-
Corresponding Integration server:- dest://{h-type rfc destination}
If you do not want to create RFC destination you can directly give
the Integration server address(that you can obtain from SXMB_ADM of XI) in the
Corresponding Integration server field.
This is to activate the communication between SNC and PI.
now you need to create the file structure in XI.
the next step is to do the mapping between the file structure and the appropriate interface
As yours is a flat file you need to do a file content conversion
In Integration directory you need to configure two channels one for File and the other one for Proxy.
regards,
Milan -
INPUT Parameter of INBOUND ABAP PROXY
Hello Friends,
We have created the inbound proxy via SPROXY and we have implemented the class ZACCL_MI_VENDOR_MASTER_PROXY_I for the same. Now In the structure tab of ABAP Proxy I can see the following structure of the INPUT.
INPUT-MT_VENDOR_MASTER_PROXY -VENDOR -VENDOR_DETAIL -RECORD_TYPE.
Now in the record_type we are passing a single parameters C or N. i.e if i is N then new and if it C then change.
In my class implementation i am doing the followin check.
CASE input--MT_VENDOR_MASTER_PROXY -VENDOR -VENDOR_DETAIL -RECORD_TYPE. WHEN 'N'.
CALL METHOD me->create_vendor
EXPORTING
input = input
IMPORTING
title = title
it_recp = it_recp
it_contenttext = content_text.
WHEN 'C.
CALL METHOD me->change_vendor
EXPORTING
input = input
IMPORTING
title = title
it_recp = it_recp
it_contenttext = content_text.
but I am getting following error message.
input-MT_VENDOR_MASTER_PROXY-VENDOR-VENDOR_DETAIL-RECORD_TYPE is unknown.
Could you please help me on this issue.
Thanks & Regards,
NagarajIf one of MT_VENDOR_MASTER_PROXY,VENDOR or VENDOR_DETAIL is a table type and not a flat structure, then your statement will not work.
Suppose if VENDOR_DETAIL is a table type, then you have to access RECORD_TYPE this way.
* Create it_vendor_detail type table of <VENDor_DETAIL>...
it_vendor_detail[] = input-MT_VENDOR_MASTER_PROXY-VENDOR-VENDOR_DETAIL[].
loop at it_vendor_detail into wa_vendordetail.
case wa_vendordetail-record_type.
when 'N'....
when 'C'...
endcase.
endloop.
Regards,
Ravi -
Hi,
I want to send data using an ABAP proxy from SAP ECC to PI.
The location where I call the method is in MV50AFZ1 Form uxerexit_delete_document
In my opinion it is not wise to execute a commit work statement in this location. The proxy however needs a commit work to send the data.
I also tried using a CALL FUNCTION ... IN UPDATE TASK. This also doesn't trigger the proxy to send the data.
(and it is not allowed te execute a commit in update task .. .because it's already a "commit".
Is there a way to get this thing working in this way? Or do you always have to program a separate program for sending the data with a proxy??
Thanks
RonHi Ron,
Try submitting a report as a background job from the user exit...and inside this report you can write the code to call the proxy + commit.
*Submit report as job(i.e. in background)
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
Insert process into job
SUBMIT zreport and return
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif. -
Debugging of inbound ABAP proxy
Please To show the debugging of inbound ABAP proxy, the implementation of the demo scenario is used. The demo scenario is available in any installation WebAS 6.40 or higher.
follow this method and check debugging mode.
Debugging of inbound proxies in WebAS 6.40 or higher
To show the debugging of inbound ABAP proxy, the implementation of the demo scenario is used. The demo scenario is available in any installation WebAS 6.40 or higher.
At first you have to set a break point in the ABAP code. Call transaction SPROXY. Expand the namespace http://sap.com/xi/XI/Demo/Airline, the node Message Interface (inbound) and the interface FlightBookingOrderRequest_In.
Double click on interface II_SXIDAL_FBO_REQUEST and get the view of the proxy object properties.
Double click on the implementing class (ABAP name) and then double click on the method name (this class has only one method).
Now you are in the inbound proxy implementation. Set the break point on the first executable line.
With help of the back button (F3) go back to the transaction SPROXY. Here you choose from menu Proxy -> Test Interface
In the next pop up check the field XML Editor to maintain the payload.
In the next screen apply suitable values or upload the XML payload of the SXMB_MONI (after mapping).
Now the inbound proxy processing should stop at the break point.
If the processing does not stop at the break point, there might be an error in the XML. Check at the result page for error messages.
Debugging of inbound proxies in WebAS 6.20
You set the break point the same way as described above.
To start the proxy test you call the report SPRX_TEST_INBOUND.
As parameters you enter the name of the ABAP interface and the method name of of the ABAP interface and check the parameter Edit Native XML
In the next screen you apply suitable values or upload the XML payload of the SXMB_MONI (after mapping).
Then you click first on save button (F11), then on back button (F3).
Now you should see your debug session. If not, check if the XML is valid. BAPI_GOODSMVT_CREATE to post Goods Movement
The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
BAPI TO Upload Inventory Data
GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
02 - MB31 - Goods Receipts for Prod Order
03 - MB1A - Goods Issue
04 - MB1B - Transfer Posting
05 - MB1C - Enter Other Goods Receipt
06 - MB11
Domain: KZBEW - Movement Indicator
Goods movement w/o reference
B - Goods movement for purchase order
F - Goods movement for production order
L - Goods movement for delivery note
K - Goods movement for kanban requirement (WM - internal only)
O - Subsequent adjustment of "material-provided" consumption
W - Subsequent adjustment of proportion/product unit material
report zbapi_goodsmovement.
parameters: p-file like rlgrap-filename default
'c:\sapdata\TEST.txt'.
parameters: e-file like rlgrap-filename default
'c:\sapdata\gdsmvterror.txt'.
parameters: xpost like sy-datum default sy-datum.
data: begin of gmhead.
include structure bapi2017_gm_head_01.
data: end of gmhead.
data: begin of gmcode.
include structure bapi2017_gm_code.
data: end of gmcode.
data: begin of mthead.
include structure bapi2017_gm_head_ret.
data: end of mthead.
data: begin of itab occurs 100.
include structure bapi2017_gm_item_create.
data: end of itab.
data: begin of errmsg occurs 10.
include structure bapiret2.
data: end of errmsg.
data: wmenge like iseg-menge,
errflag.
data: begin of pcitab occurs 100,
ext_doc(10), "External Document Number
mvt_type(3), "Movement Type
doc_date(8), "Document Date
post_date(8), "Posting Date
plant(4), "Plant
material(18), "Material Number
qty(13), "Quantity
recv_loc(4), "Receiving Location
issue_loc(4), "Issuing Location
pur_doc(10), "Purchase Document No
po_item(3), "Purchase Document Item No
del_no(10), "Delivery Purchase Order Number
del_item(3), "Delivery Item
prod_doc(10), "Production Document No
scrap_reason(10), "Scrap Reason
upd_sta(1), "Update Status
end of pcitab.
call function 'WS_UPLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
loop at pcitab.
itab-move_type = pcitab-mvt_type.
itab-mvt_ind = 'B'.
itab-plant = pcitab-plant.
itab-material = pcitab-material.
itab-entry_qnt = pcitab-qty.
itab-move_stloc = pcitab-recv_loc.
itab-stge_loc = pcitab-issue_loc.
itab-po_number = pcitab-pur_doc.
itab-po_item = pcitab-po_item.
concatenate pcitab-del_no pcitab-del_item into itab-item_text.
itab-move_reas = pcitab-scrap_reason.
append itab.
endloop.
loop at itab.
write:/ itab-material, itab-plant, itab-stge_loc,
itab-move_type, itab-entry_qnt, itab-entry_uom,
itab-entry_uom_iso, itab-po_number, itab-po_item,
pcitab-ext_doc.
endloop.
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = gmhead
goodsmvt_code = gmcode
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
MATERIALDOCUMENT =
MATDOCUMENTYEAR =
tables
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg
clear errflag.
loop at errmsg.
if errmsg-type eq 'E'.
write:/'Error in function', errmsg-message.
errflag = 'X'.
else.
write:/ errmsg-message.
endif.
endloop.
if errflag is initial.
commit work and wait.
if sy-subrc ne 0.
write:/ 'Error in updating'.
exit.
else.
write:/ mthead-mat_doc, mthead-doc_year.
perform upd_sta.
endif.
endif.
FORM UPD_STA *
form upd_sta.
loop at pcitab.
pcitab-upd_sta = 'X'.
modify pcitab.
endloop.
call function 'WS_DOWNLOAD'
exporting
filename = p-file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = pcitab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
OTHERS = 6
endform.
*--- End of Program
Finding the user-exits of a SAP transaction code
Finding the user-exits of a SAP transaction code
Enter the transaction code in which you are looking for the user-exit
and it will list you the list of user-exits in the transaction code.
Also a drill down is possible which will help you to branch to SMOD.
report zuserexit no standard page heading.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
*---End of Program
u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
Difference Between BADI and User Exits
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.
What is difference between badi and user-exists?
What is difference between enhancements and user-exists? and what is the full form of BADI?
I have another doubt in BDC IN BDC WE HAVE MSEGCALL (i did not remember the > correct name) where the error logs are stored, MSEGCALL is a table or structure.
What is the system landscape?
1) Difference between BADI and USER-EXIT.
i) BADI's can be used any number of times, where as USER-EXITS can be used only one time.
Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
ii) BADI's are oops based.
2) About 'BDCMSGCOLL' it is a structure. Used for finding error records.
3) Full form of BADI 'Business addins'.
3) System land scape will be depends on your project
Ex:- 'Development server'>'Quality server'-> 'Production server'......
List Of User Exit Related to VL01N
I need to some restriction in fields ( Actual GI Date, T-Code:Vl01n ).
How do you find out whcih user exits belongs to VL01n ?
Here is the list of user exit related to VL01N :
V02V0001 - Sales area determination for stock transport order
V02V0002 - User exit for storage location determination
V02V0003 - User exit for gate + matl staging area determination
V02V0004 - User Exit for Staging Area Determination (Item)
V50PSTAT - Delivery: Item Status Calculation
V50Q0001 - Delivery Monitor: User Exits for Filling Display Fields
V50R0001 - Collective processing for delivery creation
V50R0002 - Collective processing for delivery creation
V50R0004 - Calculation of Stock for POs for Shipping Due Date List
V50S0001 - User Exits for Delivery Processing
V53C0001 - Rough workload calculation in time per item
V53C0002 - W&S: RWE enhancement - shipping material type/time slot
V53W0001 - User exits for creating picking waves
VMDE0001 - Shipping Interface: Error Handling - Inbound IDoc
VMDE0002 - Shipping Interface: Message PICKSD (Picking, Outbound)
VMDE0003 - Shipping Interface: Message SDPICK (Picking, Inbound)
VMDE0004 - Shipping Interface: Message SDPACK (Packing, Inbound) -
Send message with abap proxy client
I'm trying to send message to XI, but no message in sxmb_moni.
I have created logical port with LPCONFIG.
ABAP code
REPORT Z_HTTP_SEND.
DATA:
* Reference variables for proxy and exception class
lo_clientProxy TYPE REF TO ZPCO_MI_COMPANY_OB,
lo_sys_exception TYPE REF TO cx_ai_system_fault,
* Structures to set and get message content
ls_request TYPE ZPMT_COMPANY_ID,
ls_response TYPE ZPMT_COMPANY_DETAILS.
*Complete the structure ls_request for the request message.
*DATA: zmt_id type ZPMT_COMPANY_ID,
*zdt_id type ZPDT_COMPANY_ID,
*z_id_tab type ZPCOMPANY_ID_TAB,
*z_id type ZPCOMPANY_ID.
*z_id-COMPANY_ID = '3000'.
*append z_id to z_id_tab.
* zdt_id-RECORD = z_id_tab.
*zmt_id-MT_COMPANY_ID = zdt_id.
DATA tab TYPE ZPCOMPANY_ID_TAB WITH HEADER LINE.
tab-COMPANY_ID = '3000'.
APPEND tab.
ls_request-MT_COMPANY_ID-RECORD = tab[].
TRY.
* create proxy client
*CREATE OBJECT lo_clientProxy( u2018LOGICAL_PORT_NAMEu2019 ).
CREATE OBJECT lo_clientProxy.
* do synchronous client proxy call
CALL METHOD lo_clientProxy->execute_synchronous
EXPORTING output = ls_request
IMPORTING input = ls_response.
CATCH cx_ai_system_fault INTO lo_sys_exception.
* Error handling
ENDTRY.
Any ideas? Thanks very much,Hi,
Proxies communicate with the XI server by means of native SOAP calls over HTTP .RFC does not, so you have to convert from SOAP to RFC calls and vice versa. So XML conversion is required.
ABAP Proxies uses Webservice and Http Protocols. And if you use RFC it is mainly meant for Sync. call. But Proxies is used for both Sync and Async.
If you use ABAP Proxy , you can reduce the overhead calling the function again and again.
How do you activate ABAP Proxies? - Activate Proxy
ABAP Server Proxies - ABAP Server Proxy
ABAP Proxies in XI(Client Proxy) - ABAP Client Proxy
Re: JDBC Sender select/update problem
If u generate proxy for outbound interface then its client proxy and for inbound interface its server proxy.
In client proxy u can call the method to send messages but u can't modify it but in server proxy its possible to write a user code within the method to execute proxy.
CLIENT PROXY:
A WSDL description from a UDDI server (or an Internet page) is usually used to make a service executable in the Internet and to describe the interface of this service. You require a client proxy and not a server proxy to call this service by using the Web service infrastructure.
SERVER PROXY:
You can only generate ABAP server proxies from a WSDL description if they originate in the Integration Repository.You can also generate server proxies for Java and client proxies for ABAP from message interfaces.
s refer these doc about ABAP proxy ..
How do you activate ABAP Proxies? - Activate Proxy
ABAP Server Proxies - ABAP Server Proxy
ABAP Proxies in XI(Client Proxy) - ABAP Client Proxy
Re: JDBC Sender select/update problem
ABAP Server Proxies
How do you activate ABAP Proxies?
ABAP Proxies in XI(Client Proxy)
File to R/3 via ABAP Proxy
http://help.sap.com/saphelp_nw2004s/helpdata/en/48/d5a1fe5f317a4e8e35801ed2c88246/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/ba/f21a403233dd5fe10000000a155106/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/41e08c90-0201-0010-9197-d8774336ea78
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ae9874-109c-2910-f48a-e91f0cdd1c81
Smarter Approach for coding ABAP Proxies
regards,
Surya
Maybe you are looking for
-
Can I use a foreign credit card for Photography package?
Hi I have a credit card that has a foreign billing address. There's no way to change the country for the billing address. Is there any way I can charge my credit card?
-
I can't reset an Apple ID - Apple site down?
I can get the email confirmation; but when i click on the reset link, it should take me to the password reset page, but it does not; the screen is just blank like a dead link
-
Install oracle 9.2.0.4 database on ubuntu 6.06
i tryed to install this oracle version, i dowload thre disks, i created thre cd, the first disk1 isn't autorun 1) then i tryed to run instalation just writting in a terminal (in the directory cdrom/install/linux) ./runInstall there is an error about
-
Windows Multipoint Server CAL requirement
Hello, I have to do an installation of Windows Multipoint Server 2011 Premium. By default it comes with 20 users access for Remote Desktop. My query is should I have CAL'S for first 20 users or is it free with base server licensing. And what if I hav
-
Getting error EXP-00003: no storage definition found for segment(0, 0)
I am getting an error when using "Export: Release 11.2.0.1.0 - Production" on "AIX 6.1.0.0" and connecting to a remote database with version "Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production". I have tried many different o