Quantcast
Channel: SCN : Unanswered Discussions - ABAP Connectivity
Viewing all 1115 articles
Browse latest View live

Save XML with HTTP connection

$
0
0

Hello,

 

I have an XML file and I need to save it in a HTTP patch.

 

The transformation code it's working and I created an HTTP connection(SM59) that is working as well. I'm never did that before but I guess that I'm open the connection on my ABAP code, since it ask for user and password to login, but I have no idea how to save something in there.

 

Follow the code:

 

data: client      type ref to if_http_client.

data: request     type ref to if_http_request.

 

cl_http_client=>create_by_destination(

                 exporting destination = http_dest

                 importing client = client ).

 

   call method client->request->set_method(

     if_http_request=>co_request_method_get ).

 

* set protocol version

   client->request->set_version(

        if_http_request=>co_protocol_version_1_0 ).

 

* content type

   call method client->request->if_http_entity~set_content_type

     exporting

       content_type = 'multipart/form-data'.

 

*** Send HTTP request

   call method client->send

     exceptions

       http_communication_failure = 1

       http_invalid_state         = 2

       http_processing_failed     = 3

       http_invalid_timeout       = 4

       others                     = 5.

   if sy-subrc <> 0.

     raise connection_error.

   endif.

 

*** Get GTTP response

   call method client->receive

     exceptions

       http_communication_failure = 1

       http_invalid_state         = 2

       http_processing_failed     = 3

       others                     = 4.

 

   if rc = 0.

 

*** Read HTTP RETURN CODE

     client->response->get_status( importing code = http_rc ).

 

     if http_rc <> 200.

       """KO

     else. "status 200 ->>OK

       clear: xml_xstring.

       xml_xstring = client->response->get_data( ).

 

     endif.

   endif.

 

* VERY IMPORTANT: close your connection

   client->close( ).

 

   call function 'SRTUTIL_HELPER_XML_SHOW'

     exporting

       xdoc = xml_xstring

       html = abap_false.


Thanks,

Andréa


Idocs delins : Delete field PARTN in E1EDKA1 we

$
0
0

Hello,

 

My problem is linked to the field   PARTN in the segment E1EDKA1 in the idocs DELFOR01 ,  Now i have a  value in this field <PARTN>  .

 

I want to delete this  fileld  in the idocs , so to generate idocs without fiels Partn in the segement E1EDKA1-we ?

 

 

Where this information is managed ? please help

 

 

 

Thank you

SAP NW RFC - Error LNK2019

$
0
0

Hello

 

I am programming a simple RFC server program which should be called by an ABAP program. It compiles without any errors, but please can somebody help me with the following linker errors:

 

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_nlsui_initialize" in Funktion "_wmain".

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RfcListenAndDispatch@12" in Funktion "_nlsui_main".

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RfcRegisterServer@12" in Funktion "_nlsui_main".

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RfcInstallServerFunction@16" in Funktion "_nlsui_main".

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RfcCloseConnection@8" in Funktion "_nlsui_main".

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RfcGetFunctionDesc@12" in Funktion "_nlsui_main".

1>myrfc2010.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_RfcOpenConnection@12" in Funktion "_nlsui_main".

1>C:\startrfc2010.exe : fatal error LNK1120: 7 nicht aufgelöste externe Verweise.

 

I think I set all the project properties right and tried a lot of different things to solve the problem but now I do not know what to do.

 

Thank you for your help in advance and best regards

Max

WSDL generation

$
0
0

    
Hi,

 

SAP always generates sequence definitions in WSDL like this:

 

    <xsd:sequence>

     <xsd:element name="item" type=...

    </xsd:sequence>

 

so that sequences in messages look like in this example:

 

         <Errors>

            <item>

               ...

           </item>

            <item>

               ...

           </item>

         </Errors>

 

Is there any way to control wsdl generation to have different item tags in different sequece type definitions.

 

         <Errors>

            <error>

               ...

 

         <Materials>

            <material>

               ...

 

Thanks,

Victor

Issue connecting from NWBC to SAP App server

$
0
0

Hello All,

 

We having activated MDG for material master in our sandbox environment. I am able to login into the SAP_MDGM_MENU_03 (Master Data Governance for Material: Menu) successfully.

 

But once I go in, the other functionality are not working. For. e.g. Change material, search material. On clicking any of the links it gives a HTTP: 500 server error.

 

I went to ST22 and checked the dump and it gave the following message - Runtime error GETWA_NOT_ASSIGNED

 

Also when going into SM59 transaction it gives a message - RFC call back check not secure.

 

Please provide any pointers.

 

Thank you

Lakshminarayanan

how to add customized infotype into standard msg type HRMD_A01

$
0
0

Hi Experts,

 

  Our customer need to distribute SAP HR master data to OA system timely.however, there are several customized infotypes which cannot triggered by standard message type HRMD_A01. Now, segment Z1P9504 of customized infotype HRP9504 has been added to E1PITYP. we have no idea what are the next steps? where to transfer values to idoc structure? look forward to you help, thanks!

QQ图片20140610095114.jpg

BADI : BIC_ADDITIONAL_DATA - PARAMETER - CS_MASTER TO BE MODIFIED

$
0
0

Hi All, I am using a badi : BIC_ADDITIONAL_DATA for extending one field for the report called in T.Code : BMBC

 

Implemented  to ZBIC_ADDITIONAL_DATA and the following method been extended and writen code.

 

Method IF_EX_BIC_ADDITIONAL_DATA~MASTER_COLUMNS_ADD extended one field like this.

 

Code return in the method:

DATA : WA_ET_MASTER_FCAT_ADD TYPE LVC_S_FCAT. 

WA_ET_MASTER_FCAT_ADD-COL_POS  = '3'. 

WA_ET_MASTER_FCAT_ADD-FIELDNAME = 'LICHN'. 

WA_ET_MASTER_FCAT_ADD-REF_FIELD = 'LICHA'. 

WA_ET_MASTER_FCAT_ADD-REF_TABLE = 'MCHA'. 

APPEND WA_ET_MASTER_FCAT_ADD TO ET_MASTER_FCAT_ADD.

 

Now i have to populate data to the new field LICHN.

 

This method is used to add the value for the new field.

IF_EX_BIC_ADDITIONAL_DATA~MASTER_ADD_DATA_FILL_IN

 

Parameter :CS_MASTER available in method MASTER_ADD_DATA_FILL_IN to be modified for getting the value for the field LICHA

 

CS_MASTER is the type ANY. So, we need to modify the parameter, it is not the straight forward approach. I need to used OOPS code to modify the value. Can you guide how to add the value to the parameter CS_MASTER. Regards, Ambrose

IDOC's Issue in FI

$
0
0

Dear Friends

 

We have a requirement where I want to send a IDOC file to the bank for Japan & Taiwan legal entities, For Japan we need to send the IDOC file with vendor name in Japanese Language, whilst Taiwan legal entity will have Chinese Vendor name & it must appear in Chinese language.

 

kindly put some light on this & let me know how to solve? Appreciate your valuable suggestions!!!

 

Cheers

Pradyp


ADR3MAS Data Filter

$
0
0

Hello Experts,

 

I have successfully configured our distribution model using the CREMAS Message type and the BAPI addressper.savereplica and addresscont.savereplica I've also configured the vendor class to distribute ALE data and assigned our vendor class to one of the two logical system defined. At this point we are successfully able to create CREMAS and ADRMAS IDocs based on the Vendor Object assignment to the class and have them sent to the appropriate logical system.

 

My problem is I am now trying to restrict the ADR3MAS IDocs to be only created for those vendors belonging to the vendor class I assigned to my logical system. Does any one know how to add a restriction to the message type filter for the addresscont for contact persons?

 

Please note our requirement is that we have two logical systems that receive the ADR3MAS IDoc yet only the relevant ADR3MAS IDocs for the vendor class should be sent to the assigned logical system.

 

Please let me know your thoughts

 

Thank you,

 

Joseph

How to find hardcode in an IDOC coding

$
0
0

Hi Experts,

 

I am working on a project in which i need to find our set of hardcode in all the idocs and then replace it with some other. Is there any way to find all hardcode of an idoc in one place.

 

Any help is extremely appreciated.

How to enable/customize URL links in R/3 ECC system

$
0
0

Dear Friends

 

we have a requirement in R/3 ECC system where we need to call a web links (URL's) and this URL need to navigate to the external system like  

Eg: Google & can access few details/information from it. All I want to know is, what is the way to achieve this requirement & where I can start with.

 

Await for your valuable suggestions

 

Cheers

Pradyp

XML format of IDOC

$
0
0

Hi Experts,

 

I would like to download the XML format of an IDOC.  For example, I would like to have something like this with all the fields of the IDOC:

 

<?xml version="1.0" encoding="UTF-8"?>

<ZORDERS01 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Schemas/zorders01.xsd">

<IDOC BEGIN="1">

  <EDI_DC40 SEGMENT="1">

    <TABNAM>EDI_DC40</TABNAM>

    <DOCNUM>0000000000004711</DOCNUM>

    <DIRECT>1</DIRECT>

    <IDOCTYP>ORDERS01</IDOCTYP>

    <CIMTYP></CIMTYP>

    <SNDPOR>SAPP01</SNDPOR>

    <SNDPRT>LS</SNDPRT>

    <SNDPRN>aaaaaaaaaa</SNDPRN>

    <RCVPOR>aaaaaaaaaa</RCVPOR>

    <RCVPRN>aaaaaaaaaa</RCVPRN>

  </EDI_DC40>

  <E1EDK01 SEGMENT="1">

    <BSART>ZOPE</BSART>

    <LIFSK>03</LIFSK>

  </E1EDK01>

  <E1EDK14 SEGMENT="1">

    <QUALF>006</QUALF>

    <ORGID>20</ORGID>

 

Is there any transaction that enables to download the structure of an IDOC in this format?

 

Thanks,

Vitish.

ano

$
0
0

creation of  dynamic internal table with two  methods

1. call method cl_alv_table=>create _dynamic_table

 

2. DATA: wr_struct_descr TYPE REF TO cl_abap_structdescr,

              wr_tab_descr TYPE REF TO cl_abap_tabledescr.

which method is correct to follow

FM IDOC_XML_FROM_FILE - Athorization Issue

$
0
0

Hi Experts,

 

We are creating an IDOC using the FM IDOC_XML_FROM_FILE with the option to be triggered immediately.  The IDOC falls in error with the message 'No maintenance authorization for shipping point &'.

 

We have checked all the authorizations of the user and these are OK.  The user is able to update the delivery on VL02N but not via the IDOC.

 

Could you please help?

 

Thanks,

Vitish.

Inbound IDoc ORDERS05 : PO Rejection Indicator Issue

$
0
0

Hello,

 

We are receiving idoc ORDERS05 with message type ORDRSP from vendor(PO Confirmation) with 003 as ACTION in field E1EDP01-Action.

 

but still rejection indicator for PO item is not getting Set.Hence we see PO item is not marked deleted.

 

Could you please suggest what we are missing ?


Outbound IDOC - Send Copy Different Port

$
0
0

Hi experts,

 

It is my first time handling IDOC's, só excuse me if is simple.
I have been looking through the forum and didn't find the exact requirement as I have.

 

We have a IDOC comunication between two SAP Machines by RFC conection. But when the communications are down, we will copy the original IDOC and change the PORT only to be a XML port.

I have done it through the WE19, change the port and Process it and it goes OK.

 

But in ABAP, I'm using FM IDOC_READ_COMPLETELY  to read the Original and change the PORT on the IDOC Control. Then the FM BAPI_IDOC_INPUT1 to insert the IDOC but it keeps not working. I have tryed clear the IDOC number, give him a new IDOC number, etc etc ..
Any tips would be welcome.
Thank you.

PO creation through third system

$
0
0

Hi Friends,

 

We have one process wherein PO is created in thirdparty system & that is being created in SAP through RFC call. Middleware used is Biztalk.

Now we have new third party system ( BOL) which need to do same job of PO creation. I want to know how process flows while integrating third party system to SAP .What are the details I will require from tool BOL etc. Is there any standard process which I can follow to get this done.

 

Thanks,

Kiran

how to resolve Issues while implement gateway security by using reginfo,secinfo?

$
0
0

Hi,

 

I want to implement gateway security using  gw/reg_info,  gw/sec_info,  gw/reg_no_conn_info.

 

so far I have created reginfo and secinfo files to allow all internal traffic and I kept gw/reg_no_conn_info=11, gw/acl_mode=1

 

reginfo

======

#VERSION=2

P TP=*,HOST=local

P TP=*,HOST=internal

P TP=*,HOST=*.abc.com

 

with the above setting I believe all the programs with in sap systems(including app servers), also system from domain abc.com can register programs with out having any issues.

 

secinfo:

======

#VERSION=2

P TP=* USER=* USER-HOST=local HOST=local

P TP=* USER=* USER-HOST=internal HOST=internal

 

similarly  as per secinfo content I believe that all the internal traffic can go with out any issue with in sap system.

 

beside that I have activated gateway logging to find the rejecting connections if any.

 

I have following questions:

===================

 

1)As the reginfo,secinfo files maintained can I remove gw/acl_mode=1 parameter ?

 

2)if I want to add a specific programs to register from 3rd party system, suppose a program called "zram" from system "172.198.10.1" where I suppose to add it. Do I need to add that IP to secinfo along with reginfo?

 

3)when I set parameter gw/reg_no_conn_info=11 when convert to binary it equals to 00001011

 

what exactly this means from the following definitions from note 1444282

 

 

1 1298433 Bypassing security in reginfo & secinfo


2 1434 117 Bypassing sec_info without reg_info


4 1465129 CANCEL registered programs


8 1473017 Uppercase/lowercase in the files reg_info and sec_info

 

will that means 8+2+1 means satisfying the above 3 lines except condition 4 ?

4) I enabled  gateway logging, how could I catch rejecting connections from third party systems?

 

5)From simulation mode I got to know that It will satisfy reginfo,secinfo restrictions and it will allow all other traffic.so what is the added advantage with this when activate?

 

6)is there any sap native tools which help while preparing reginfo, secinfo files?

 

Regards,

Koteswararao.Davuluri(Koti).

Using RFC_CALL in ACCESS - percentage value

$
0
0

Hi folks,

 

we are using the RFC_CALL function (RFC_READ_TABLE) to get data from SAP-tables to MS-Access. This works fine except for fields with an percentage value >= 100%

 

For example 101,50% will be downloaded as *1,50 and you can't distinguish it from 111,50% which also would be *1,50.

All values < 100% are no problem.

 

Has anybody seen this behaviour and has a tip for me?

 

Many thanks in advance

 

Ulli Sahm

List Tree (cl_gui_list_tree) node add and item change problem

$
0
0

Hallo!

 

I'm developing an application, which is related with List Tree (to be honest, i'm new to Trees). In this application a user can drag and drop a string from the ALV-Grid into the List Tree.If the Tree does not cantain this string jet, then a new node with unique ID will be created and a new item, connected to this node. If the user the second, third... times drag and drops the same table line, then the node is not to be created, but the item text is to be updated (this text contains number of rag and drops, applied to this table-line/node). I have node found any method, which allow the user to check, if the node with the certain ID already exists. So i decided to to id the following way: i use the method item_set_text. If the node exists, then the text is successfully updated. When the node does not exist, then this method should return an Exception. But It does not! The sy-subrc is always 0. But if the node does not exists, then i get DUMP on screnn FLUSH.

 

gr_list_tree->item_set_text(

       EXPORTING

         node_key          = NODE_ID

         item_name         = '2'

         text              = NEW_TEXT

       EXCEPTIONS

         failed            = 1

         node_not_found    = 2

         item_not_found    = 3

         cntl_system_error = 4

         OTHERS            = 5 ).

 

     CASE sy-subrc.

       WHEN 2.

       "create node and add item

       APPEND INITIAL LINE TO lt_nodes ASSIGNING <ls_node>.

       <ls_node>-node_key    = ....

       <ls_node>-relatkey    = ....

 

       APPEND INITIAL LINE TO lt_items ASSIGNING <ls_item>.

       <ls_item>-node_key    = ....

       <ls_item>-item_name   = .....

 

     ....

 

       CALL METHOD gr_list_tree->add_nodes_and_items

         EXPORTING

           node_table                     = lt_nodes

           item_table                     = lt_items

           item_table_structure_name      = space

         EXCEPTIONS

           failed                         = 1

           cntl_system_error              = 2

           error_in_tables                = 3

           dp_error                       = 4

           table_structure_name_not_found = 5

           OTHERS                         = 6.

       IF sy-subrc <> 0.

       MESSAGE 'Error building right tree' TYPE 'E'.

       ENDIF.

     WHEN 1 OR 3 OR 4 OR 5.

       MESSAGE 'Error adding node' TYPE 'E'.

     ENDCASE.


Why does this method so wrong work? May be anyone know, what the reason is...

Or, as alternative to my way, may be onyone knows, how to get, if the node already exists.

I my head, i can only create my own table and store there the added nodes.. But maybe is there another way?

Help me please.

Viewing all 1115 articles
Browse latest View live