Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

BAPI_PO_CREATE1 not return custom error messages.

$
0
0

Hi Experts,

 

We are created po using bapi it not returns any custom error messages please advise on this.

 

Thanks for advance.

 

Regards,

Upendra


Pricing routine late delivery charges

$
0
0

Hi Gurus,

     Can you give solution for my requirement. My requirement is ,

    

I need to create Custom fields to VA31 and same has to be applicable for VA32 and VA33. As well as VA41 also.

In those Tcodes SAP provided one extra screen that is Additional data B. So need to add my Custom fields to 'Additional data B' subscreen.

This is existing SAP subscreen. And same fields has to be created in VA41 also in same subscreen.

 

And my another requirement is in same scenario, In VA31 condition tab i need to do some calculation by creating routine (VOFM).

For this calculation part where i should write logic.

 

Could anyone give me solution for adding custom fields to standard sap screen ASAP. And where i should write the logic. Thanking you

 

Thanks,

Satish P

Comparing two Internal tables

$
0
0

Hi Team,

 

Is it possible to delete the entries from two internal tables which are same with out using loop.Please suggest solution.

 

Note: Loop is causing performance pb.

 

Internal Table1                         Internal Table2                      Result required

 

Field1                                      Field1                                   

 

 

A                                              A                                              C

   

B                                              B                                              D

 

C                                           

 

 

 

                                        

 

Thanks and Regards,

Uma

Need to Capture the Po item level Condition values.

$
0
0

Hi..

I need a small information

Normally In Po We can maintain the Condition amounts Each row which. like.Please have a look On below Example.

 

At item level. Suppose Two line items are available  these two are condition value as 500+1500  total 2000.

 

Line1Con typeAmount
1zn1500
2zn21500

 

 

At Header level of the Po.

 

Con type Amount
zn12000

 

I Can capture header level In Konv But I need Each Condition type line wise. How could i get the value.

How to attached gos toolbar in standard tcode

Purchase requisition is mandatory field in ME21N t-code

$
0
0

Hi Experts,

 

I have a requirement like purchase requisition field is mandatory in ME21N t-code. How can i upload excel data through BAPI in ME21N t-code without purchase requisitions field. It is possible to upload with out mandatory field. Please help me on this.

 

 

Regards

Reddy

IDoc after adding Z text

$
0
0

Hi,

 

We have scenarios where we create Shipment document (VT01n) using BAPI. Before this, we use to add test using standard BAPI structure and shipment and Text 1-4 was getting created in single LUW. IDOC is setup as output causing IDOC to trigger

 

In the change scenario, we have to add more texts  so we have created Z text ( 12 of them) and now working on the code to add it

Using FM Create text requires, shipment no so i am calling this FM after the BAPI and commit work.

 

However, i am noticing that this treated as change in Shipment document and every text addition ( ZText1-12) is causing one idoc to trigger.

So lets say we have 12 Z text, it causes 12 idoc to create.

 

Can you advice, if we can advice Z text before the Shipment of if we have to do how to avoid multiple IDOC creation

 

Thxs!

MB5B submit for lot of materials

$
0
0

Hi,

 

          I need opening stock from MB5B report where I need to pass some materials which are coming from BAPI so while using SUBMIT statement

as SUBMIT  RM07MLBD WITH MATNR IN IT_MATNR

                                          WITH WERKS = P_WERKS

                                          WITH DATUM  = PREV_DAY.

 

So while executing I am facing dump with text :

Value table for IN itab operator has an unexpected format.

 

Structure of IT_MATNR is  RSPARAMS.

 

Is there any other way to do this or where am I going wrong ?

 

Regards,

Avinash


Column heading uses only short flag in alv tree display

$
0
0

I am using  CL_GUI_ALV_TREE class to display a tree alv control.

I am using a global structure.The fields in global structure have data elements with field label set for short,medium and large.

When the alv is displayed ,it shows only the short field label as the column header.When i increase the column width the column heading does not change.If i keep the short field label as blank then blank is being displayed as column heading.

I am not setting any other optin while building the field catalog.Do i have to make some changes while creating field catalog?

 

Thanks.

Adding fields in Standard ALV Display for IW38 /39 T-code

$
0
0

Hi ,

 

I have a requirement I need to add custom fields in standard ALV Display of  IW38 / IW39 T code.

 

 

Any one please tell me the procedure.

 

 

 

Regards,

Ankamma.

BAPI FOR FB01

$
0
0

Hi,

 

Is there any BAPI for the transaction FB01.

 

Regards

Mohit

ABAP Program to start and stop SAP PI communication channels

$
0
0

Introduction


We recently faced an issue with JMS receiver communication channels in SAP PI which are frequently throwing error in case of network,connectivity issues or when the MQ queue manager is restarted.JMS receiver channels unable to reconnect to WebSphere - MQ queue manager and every time we need to manually restart the communication channels in case of this issue.


Error


JMS channel fails to connect to MQ whenever any network problem occurs. This generates the following error

“MQJMS1016: an internal error has occurred. Please contact your system administrator.

Detail: java.lang.NullPointerException:  in sending to destination queue: //TESTXXX”.


Root Cause


The main reason for this issue is that Queue Manager which would break all the connections that are idle for more than 10 minutes interval and whenever a network problem occurs the PI JMS channel goes down.


This problem is caused due to a limitation in all versions of Websphere MQ including 6.x that has been acknowledged by IBM. Websphere MQ diverges from the JMS specification and other JMS products in its behavior of notifying the JMS connection exception listener. (javax.jms.ExceptionListener).


When only a javax.jms.QueueSender object is created from a javax.jms.Session object associated with a javax.jms.Connection object, errors/drops in the connection do not invoke the associated exceptionlistener set on the connection object. Instead an exception is encountered only when the next JMS message (javax.jms.Message) is sent through the JMS sender.

However, when a MessageListener (asynchronous) is created on a Session object associated with a JMS Connection, WSMQ informs the connection's ExceptionListener immediately.There are no current solutions to the problem, only work arounds are provided.


As per the SAP note :0000948016 we need to create a ABAP program and set up batch jobs and schedule it to start and stop the JMS receiver communication channels in SAP PI.


https://websmp230.sap-ag.de/sap/support/notes/convert2pdf/0000948016?sap-language=EN


ABAP program Code


*&---------------------------------------------------------------------*

*& Report  ZRESTART_JMS_RCVR_CHANNEL

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*

 

REPORT  ZRESTART_JMS_RCVR_CHANNEL.

 

SET EXTENDED CHECK OFF.

 

DATA: client TYPE REF TO if_http_client.

DATA: cclient TYPE REF TO if_http_client.

DATA: dummy TYPE string,

      subrc TYPE sysubrc.

 

 

PARAMETERS:

            dest TYPE rfcdest.

 

DATA:

            protocol(8) TYPE c VALUE 'HTTP/1.0',

            path(128) TYPE c,

            mandant TYPE symandt,      " default sy-mandt,

            username TYPE syuname,     " default sy-uname,

            password(128) TYPE c,

            langu TYPE sylangu,

            listen TYPE c VALUE space,

            scheme     TYPE i VALUE 1.

 

DATA: host_str TYPE string,

      service_str TYPE string.

DATA:  ncolor TYPE i VALUE 4.

DATA : tx TYPE f, ta TYPE i, te TYPE i.

DATA : mintime TYPE f VALUE 1000000000.

DATA : t(10) TYPE p.

 

INCLUDE RSHTTPPIN_DISPLAY .

 

  DATA: wa_inout TYPE type_alv_entry,

        l_columns TYPE REF TO cl_salv_columns_table,

        l_column  TYPE REF TO cl_salv_column_table,

        l_status TYPE i,

        l_string TYPE string.

 

START-OF-SELECTION.

 

  GET RUN TIME FIELD ta.

  CALL METHOD cl_http_client=>create_by_destination

    EXPORTING

      destination              = dest

    IMPORTING

      client                   = client

    EXCEPTIONS

      destination_not_found    = 1

      internal_error           = 2

      argument_not_found       = 3

      destination_no_authority = 4

      plugin_not_active        = 5

      OTHERS                   = 5.

  IF sy-subrc <> 0.

    CASE sy-subrc.

      WHEN 3.

        MESSAGE s000(sr) WITH

          'Create failed: Argument not found'.       "#EC NOTEXT

      WHEN 4.

       MESSAGE s000(sr) WITH

         'Create failed: destionation no authority'. "#EC NOTEXT

      WHEN 5.

        MESSAGE s000(sr) WITH

         'Create failed: plugin not active'.         "#EC NOTEXT

      WHEN OTHERS.

        MESSAGE s000(sr) WITH 'Create failed'.       "#EC NOTEXT

    ENDCASE.

    EXIT.

  ENDIF.

 

  client->propertytype_accept_cookie = client->co_prompt.

 

  IF NOT username IS INITIAL AND

     NOT password IS INITIAL.

 

    DATA: password_str TYPE string.

    password_str = password.

    DATA: lclient TYPE REF TO cl_http_client,

           user TYPE string.

    user = username.

    lclient ?= client.

    CALL METHOD client->authenticate

      EXPORTING

        client   = mandant

        username = user

        password = password_str

        language = langu.

 

 

    "call method lclient->authentication.

    "Set request method

  ENDIF.

  CALL METHOD client->request->set_header_field

    EXPORTING

      name  = '~request_method'

      value = 'GET'.

 

  "Set request protocol

  IF protocol = 'HTTP/1.0'.

    CALL METHOD client->request->set_header_field

      EXPORTING

        name  = '~server_protocol'

        value = 'HTTP/1.0'.

  ELSE.

    CALL METHOD client->request->set_header_field

      EXPORTING

        name  = '~server_protocol'

        value = 'HTTP/1.1'.

  ENDIF.

 

  dummy = path.

  cl_http_utility=>set_request_uri( request = client->request

                                    uri     = dummy ).

  CALL METHOD client->send

    EXCEPTIONS

      http_communication_failure = 1

      http_invalid_state         = 2

      http_processing_failed     = 3

      OTHERS                     = 4.

  IF sy-subrc <> 0.

    CALL METHOD client->get_last_error

      IMPORTING

        code    = subrc

        MESSAGE = dummy.

 

    MESSAGE s000(sr) WITH dummy.

    EXIT.

  ENDIF.

 

  IF listen IS INITIAL.

    CALL METHOD client->receive

      EXCEPTIONS

        http_communication_failure = 1

        http_invalid_state         = 2

        http_processing_failed     = 3

        OTHERS                     = 4.

    IF sy-subrc <> 0.

      CALL METHOD client->get_last_error

        IMPORTING

          code    = subrc

          MESSAGE = dummy.

      MESSAGE s000(sr) WITH dummy.

      EXIT.

    ENDIF.

  ELSE.

    CALL METHOD client->listen

      RECEIVING

        client                     = cclient

      EXCEPTIONS

        http_communication_failure = 1

        http_no_open_connection    = 2.

    IF sy-subrc = 0.

      CALL METHOD client->receive

        EXCEPTIONS

          http_communication_failure = 1

          http_invalid_state         = 2.

      IF sy-subrc <> 0.

        CALL METHOD client->get_last_error

          IMPORTING

            code    = subrc

            MESSAGE = dummy.

        MESSAGE s000(sr) WITH dummy.

        EXIT.

      ENDIF.

    ELSE.

      IF sy-subrc <> 0.

        MESSAGE s000(sr) WITH 'communication error'.

        EXIT.

      ENDIF.

    ENDIF.

  ENDIF.

 

wa_inout-name = text-005.

CALL METHOD  client->response->get_status(

    IMPORTING code = l_status ).

  wa_inout-value = l_status.

  CONDENSE wa_inout-value.

  write:/ wa_inout-name, wa_inout-value.

 

  wa_inout-name = text-004.

  CALL METHOD  client->response->get_status(

    IMPORTING reason = l_string ).

  wa_inout-value = l_string.

  write:/ wa_inout-name, wa_inout-value.

 

  wa_inout-name = text-006.

  wa_inout-value = t.

  CONDENSE wa_inout-value.

  CONCATENATE wa_inout-value text-007 INTO wa_inout-value

    SEPARATED BY space.

  write:/ wa_inout-name, wa_inout-value.

 

ABAP report ‘ZRESTART_JMS_RCVR_CHANNEL’will takes HTTP Destination's [START and STOP] as input and triggers Connection test for the same. 


For every receiver JMS channel, two variants are created that would pass the StartChannelHTTP Destination and StopChannelDestination respectively. Finally, a batch job "ZRESTART_JMS_REC" is to be created with two steps.


First step is to call the Report "ZRESTART_JMS_RCVR_CHANNEL" with Stop variant.

Second step to call the Report with Start Variant. It’s scheduled to be executed a periodic intervals.


This process will prevent all Receiver JMS channels to be automatically start and stop the channels.

IBase Migration

$
0
0

Hello together,

 

I'm looking for a way to migrate Ibase from one SAP System to another one.

The IBase has also some z-fields in the table IBSP.

 

Actual I got the plan to simulate the IB61 on the old SAP system, so I'm getting the IBase tree, which I'm transferring per RFC to the new SAP system and creating the ibase with the tree. (The tree contains data from the production order, from the old SAP system and the components with hierarchie).

It works fine, but only the Z-Fields of the table IBSP are missing and I didn't get the link yet.

 

Are there any standard FM, which I can use? Maybe a FM to create the hole IBase tree, by reading the IBase incl. the z-fields?

 

Otherwise I got the idea to use LSMW and expand the screen of IB51 - IB53 ,like it is in the old SAP system.

 

Whats would be your prefered way? Or are there any other great ideas for the IBase migration

 

Thanks in Advance!

SAP Script printing issue in LT31-After EHP 7 upgrade

$
0
0

Hi Experts,

 

We are trying to print Transfer Orders using the transaction LT31 and our problem is not printing the value &LTAP-ABLAD& but the value exist in Database. I have tried multiple times and sometimes its getting printed. when I try to debug the script I could see come of the values like &LTAP-WEMPF&.

 

But only my concern is why the value &LTAP-ABLAD&  not printing all the times for the same TO.

 

Please advise.

Regards,

Vadamalai.

Shipping information missing in IDoc

$
0
0

Hi All,

 

I am sending outbound customer master IDoc to SAP PO using custom message type and IDoc type DEBMAS07.

I am triggering the IDoc through RBDMIDOC program. IDoc is generated successfully, but the problem is the data records doesn't hold the values for shipping information and partner function as well.

In fact segment  E1KNVVM holds only sales organization, Distribution channel division values only. Incoe terms, payment terms all are blank. And also, segment E1KNVPM is missing from data records.

 

Do I need to provide the all these values in exit/enhancement?

 

Please help. Points will be rewarded.

 

 

Thanks.

 

Ashmita


Use "Call function - starting new task" to receive results

$
0
0

Dear All,

Recently,I  use bapi 'BAPI_DELIVERYPROCESSING_EXEC' to create delivery.For some other reason,I need use sytax CALL FUNCTION fm starting new task task PERFORMING return ON END OF TASK.But in this way,I can't receive results.

I copy my code in there,please give me some advice, Thanks a lot.

Enhance BAPI_ALM_NOTIF_CREATE with extension structures

$
0
0

Hi Experts,

 

I need to enhance BAPI_ALM_NOTIF_CREATE with ExtensionIn& ExtensionOut structures in tables parameters.

Can you let me know the steps/procedures to do so?

xml file line feed issue in methods

$
0
0

<COLLECTION><Release NAME="Release" TYPE="Unknown" STATUS="0">0D 0A

<Transaction> 0D 0A

    <TransactionNumber>800001</TransactionNumber>0D 0A

    <ReleaseNumber>800001</ReleaseNumber>0D 0A

    <PrimaryObjectID>OR:wt.change2.WTChangeOrder2:20160063593:534788860-1193866430993-29816902-52-4-16-172@procom-qa1.harman.com</PrimaryObjectID>0D 0A

    <CreatedBy>wcadmin</CreatedBy>0D 0A

    <CreatedDate>2015-08-13 09:03:22 UTC</CreatedDate>0D 0A

    <Locale>en_GB</Locale>0D 0A

    <Destination>1</Destination>0D 0A

</Transaction>0D 0A

 

Hi ,

 

Please help me..

As shown above,

 

How can we achieve above format of xml file with 0D 0A as line feed.

 

I am using  create_element &  set_attribute methods for the creation of xml tree.

 

I am converting excel file data into xml format..

 

Please guide.

 

Thanks,

Darshan

Customer Payment Due Date Differences Report

$
0
0

Hi,

 

I'm trying to create a report that showing which customer payment cleared which customer invoice(s) and calculate payment and invoice due date differences. I've looked at BSID and BSAD but couldn't make the connection between payment and the invoice (We use F-32 for customer clearance by the way). If an invoice is fully cleared at once it's easy to create such a report but in case of partial payment it gets complicated. Payments for an invoice may be made in different dates so I need to calculate each payment's due date difference. There's a standard report FBL5N but it doesn't give me the info I need or payment-invoice match must be done manually hence takes too much time. Any help would be appreciated.

 

Kind regards,

va02 item overview field description change

$
0
0

Hi,

 

I need to change the field description of date service rendered,order date,first date fields in va02 item overview tab's table control.

How do I do that?

 

Thanks in advance

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>