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

Error Messaging in SM30 at bottom of screen

$
0
0

I have a simple ztable with a One Step Maintenance Screen.

 

I have some validation code in the TMG of the ZTABLE in EVENT 01 (before save).  Here is a snippet:

 

 

          SELECT SINGLE kunn2

           FROM knvp

           INTO l_kunn2

          WHERE parvw = 'AG'

            AND kunn2 = wa_pls-line+3(10).

 

         IF sy-subrc <> 0.

           CONCATENATE 'Customer ' wa_pls-line+2(10) ' entered is not a sold to!!'

                  INTO l_message SEPARATED BY space.

           MESSAGE l_message TYPE 'I' DISPLAY LIKE 'E'.

           LEAVE SCREEN.

 

         ENDIF.


The message is fine, and creates a popup style error, at the entry screen to SM30 (it leaves the screen of data entry in SM30).


Whether I have the command  LEAVE SCREEN in there or not (see above).  It basically operates the same.  The user is kicked out of data entry.


What I'd like to do is have my error message shown at the bottom and NOT have the user kicked out the SM30 New Entries screen.


How do I need to adjust my error messaging?  I've looked for awhile on this, and can't find anything suitable



Accessing data references: Differences in dereferencing

$
0
0

Hi Community,

 

could someone tell me what is the difference when accessing values in a data reference (e.g. specific fields in a structure).

 

A) m_dlv_data->docid = '1234'.

 

B) m_dlv_data->*-docid = '1234'.

 

Thanks in advance

Michael

Webdynpro- how to get parent component name in called child component

$
0
0

Hi All,

 

I have a custom Web Dynpro component in which I am calling a standard web dynpro component.

I want to do an enhancement in the called standard webdynpro component for only this custom component.

 

Is there a way I can get the parent web-dynpro name in the called standard component, similar to the way we have sy-repid etc in ECC.

Adding a field to the VA03 search

$
0
0

Hello,

 

I want to add a search field to the Intial screen of VA03. As of now there are the following fields

 

Purchase Order No

Sold-to party

Delivery

Billing Document

WBS Element

 

I want to add a field from a Custom table which will have reference to the Sales Order Number. After adding this new field I should have,

 

Purchase Order No

Sold-to party

Delivery

Billing Document

WBS Element

Vendor PO (ZTABLE-PO_NUMBER)

 

This Sales Order number should be used in the VA03 screen. Any ideas on how to implement this ?

 

Thanks,

Vijay.

Extract all text in dynpro

$
0
0

Hello,

 

I try to extract texts in dynpro. The read text pool export only message and text elements.

 

Are they a method or function to extract dynpro textpool and menu textpool ??

 

Thank you in advance.

How to reconnect to an SE38 session

$
0
0

Apologies if this is the wrong space or if it has been asked before - I can't find it.

 

I have a dodgy internet connection (through no fault of my own!) and I often get booted out of my SE38 session.

When I log back in I get the message saying I still have sessions and do I wish to terminate them - so my SE38 session is still there and I can see it.

 

My question: is there any way I can reconnect with that SE38 session so I can hit Save (which I should be doing way more often, I know).

This is through the bog standard SAP Logon.

 

thanks in advance

Rick

Using BAPI_SALESORDER_CHANGE to remove certain contract assignments

$
0
0

I cannot figure out how to use BAPI_SALESORDER_CHANGE to remove assignments as shown below without removing the contract assignment at Level 2 of the hierarchy..

If there is a way to safely manipulate the tables manually, that would be fine, but I do not know all of the tables necessary.  If there are more function modules for maintaining sales orders, then I could look at them. I have only found the one.  Please see my situation below...

 

Custom enhancement created in order to make the contract and contract line item assignments within CJ20N on the Customer enhancement tab instead of within the contract:

 

Contract screen.jpg

Project screen shot.jpg

When user selects checkbox under Clear column to remove contract and contract line item assignments at wbs level 3 (see above), it not only removes that item, but also the contract assignments at level 2.  It should only remove the item selected by the checkbox and it's children values within the hierarchy.

 

Thank you for any insight or direction you may provide.

Jon

Read COMM port using ABAP w/o third party software

$
0
0

We are implementing ECC 6.0. The first and foremost transaction is receiving of

material .  We have  a  scenario where  weight and quality data of a product 

needs to be captured via serial port (COMM1).

 

In case of weight capturing, the local computer is connected to a

digital weight display device via COMM1 port, which has typical COMM

port properties like Parity Bits/Baud Rate/Stop Bits/Bits per second

etc. We need to read COMM Port data through ABAP (through some FM/Piece

of code/ service/Class, whichever is possible) without using any other

third party application.

 

Thanks


alt calculation type for manual header condition

$
0
0

Hello all,


I'm trying to create a alt calculation type for manual header condition. But I'm not able to pass the value in header even my condition type is configured as header.I can still pass the values in item level. I can change the value using Cal type when you add the header line manually. Is it possible to add new header line using Cal type. please help

How to create TO by changing storage bin

$
0
0


Hi all,

I have a custom development where I'm using L_TO_CREATE_TR to create TO.

But i need to create TO by editing storage bin in it. is there any BAPI for that?

Thanks in advance.

 

Regards,

Sriram

getting dump while processing trhough background

$
0
0

We are posting incoming invoices through bapi incoming invoice create which is called through RFC. But we have started getting dump DYNPRO_SEND_IN_BACKGROUND how can I know this pop up & alos how can avoid such kind of error. I have attached dump.

 

Thanks,

Kiran

Function to convert PDF to XML to send in xml field.

$
0
0

Hi guys

Somebody know a Function to convert PDF to XML to send in xml field?

 

Thanks.

Removing attachment list from accounting dcoument

$
0
0

Hi,

My client wants to remove attachment list from accounting document. It can be done manually by using t-code FD02 and selecting & deleting the attachment.   There are many accounting documents that have attachments and removing manually is not possible.  I tried using batch input recording but the attachment is missing on the screen.

 

How can I remove these attachments? Is there a way of using the batch Input recording?

 

Also, is there a function module to perform this function?

 

Thanks in advance for your help

Abdul

 

 

attachment.jpg

Add line items automatically in VA01 - Sales Order Create

$
0
0

Add a line item automatically when a user clicks on save to sales order in VA01

 

 

Limitations: 

 

There is a long list of user-exits present in SD module that facilitate customization to the standard process. However, no User exits , Customer Exits or BADI's have been provided which can add an item automatically to Sales Order.

 

 

Expectations:

 

To add an item manually in a SO the only input required from the user is the material number and quantity. Rest all the information is determined automatically by the standard code.The automatic addition of item should take care of below points.

 

      • The only required input should be material number and quantity.
      • Item number ( VBAP-POSNR ) should be auto determined.
      • Item category and other item details should be read from master data / configuration tables.
      • Schedule line data to be determined as for a normal manually added item.
      • Pricing should be determined automatically.
      • Any code written in user exits should be triggered for this item as well.

 

Approach Followed:


We will be using  USEREXIT_MOVE_FIELD_TO_VBAK to write our code. This userexit is present in include MV45AFZZ of program SAPMV45A.

 

This user exit is used to transfer some fields to the sales order header.However , we will write our code in this exit to add an item during save.

 

Code:

 

*--Check if the user has pressed SAVE button

IF sy-ucomm EQ 'SICH'.

 

*--Read table XVBAP to check if the material is not already added

 

           READ TABLE xvbap INTO ls_xvbap WITH KEY matnr = 000000000000240000

                                                     updkz = 'I'.

           IF sy-subrc NE 0.

 

             CLEAR: vbap.

 

*--Initialize workareas for VBAP and VBEP


             PERFORM vbap_unterlegen(sapfv45p).

 

             PERFORM vbep_unterlegen(sapfv45e).

 

*--Populate material number and quantity

 

             vbap-matnr     = ‘000000000000240000’.

             rv45a-kwmeng   = 1000.

 

*--Call standard performs to populate material details.

*--Perform for material validations and details

             PERFORM vbap-matnr_pruefen(sapfv45p) USING charx sy-subrc.

 

*--Perform for item category determination. This will take care of substitution items if any for this material.

             PERFORM vbap-pstyv_pruefen(sapfv45p).

 

*--Perform for filling VBAP with default values from configuration and master tables

             PERFORM vbap_fuellen(sapfv45p).

 

             PERFORM vbap-matnr_null_pruefen(sapfv45p).

             PERFORM vbep-wmeng_setzen(sapfv45e).

 

*--Perform to check sales unit

             PERFORM vbap-vrkme_pruefen(sapfv45p) USING charx

                   CHANGING sy-subrc sy-msgid sy-msgty sy-msgno

                            sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

 

*--Perform to update VBAP values

             PERFORM vbap_bearbeiten(sapfv45p).

 

*--Perform for filling VBEP with default values. This will take care of schedule lines of the item

             PERFORM vbep_fuellen(sapfv45e).

 

*--Perform to check quantity

             PERFORM vbep-wmeng_pruefen(sapfv45e) USING charx

                   CHANGING sy-subrc sy-msgid sy-msgty sy-msgno

                            sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

 

*--Perform to update VBEP values

             PERFORM vbep_bearbeiten(sapfv45e).

 

*--Perform to fill conditions and pricing data

             PERFORM vbap_bearbeiten_ende(sapfv45p).

 

           ENDIF.

         ENDIF.

 

 

 

Execution Snapshots:

 

 

Go to VA01 to create a sales order. Enter sold to party and other details. Add 1 item manually.

 

1.png

 

Click on save, item 240000 should be item as next item ( POSNR 20 ).


2.png

Check the SO in VA03. Here the item 20 is added successfully.


3.png



Check line item schedule line data:


4.png

 

Check Pricing data:

 

5.png

 

Thus , we see in this way a line item can be added automatically in the sales order.

 

Advantages:

 

  • The item addition can be done on the basis of certain conditions and multiple items can be added by placing this code in a loop.
  • Since all standard performs are called to fill the data , even the different user-exits for item will be triggered if implemented for the item.
  • By adding a check for call_bapi equal to 'X' and TRTYP eq 'H' , this code can be executed from Create Sales Order BAPI also.
  • Item number is determined automatically.
  • Item category , item substitution, scheduling , availability check and pricing is done by standard performs.
  • If the requirement is to add items just as the user enters the header details, that can be done with minimum code changes.

 

Note:

 

Sensitive data has been blurred in the snapshots.

 

Feel free to provide feedback and valuable comments.

 

~ Tanmay

How to make line break in script output

$
0
0

Hi Experts,

 

I have a requirement in script, to show a 20 character text with line break, Means in main window one field is there that field width size is 4 length,so i need to display like

 

Example: combustible liquid.

 

Need in output:  comb

                        usti

                        ble

                        liqu

                        id

anyone can guide me how to display this text as per given format,See the below attached screen shot.




Thanks,


Remove subpackage from package hierarchy

$
0
0

Hi,

 

I've embedded a package as subpackage in a package hierarchy, which was a mistake. Is it possible to remove this subpackage from the package hierarchy? The subpackage should not be deleted because it already contains objects. Thanks for a tip!

BP_EVENT_RAISE - how to pass event parameter

$
0
0

Hi!

 

I would like to use  BP_EVENT_RAISE to trigger an event from MM02 user exit, similar to the post https://scn.sap.com/thread/1735561.

 

In my case, I would like to create a program that will be triggered by a material change to update all orders with the particular material. So I need to be able to use the value of eventparm in my program. I have read explanations on BP_EVENT_RAISE but I still could not figure out how I can use it. The thread above was also left unanswered.

 

I'm not sure if I should do something like:

IMPORT matnr = wmara-matnr FROM MEMORY ID 'MATNR' in the user exit then EXPORT matnr = wmara-matnr TO MEMORY ID 'MATNR' in the other program.

 

Can anyone please advise? Thanks in advance!

 

Cholen

Dump SYNTAX_ERROR in program RKE5XXXX

$
0
0

Hi

 

I have a dump in the program RKE5XXXX " the program doesn't compatible with Unicode ".

 

Now we are working in a "test" system with UNICODE.

 

I saw the OSS note "674882 - Upgrade syntax error in program RKE5XXXX"  and this note explain in details how can I change  this flag " Unicode Checks Active".

 

However, if the program is temporal and don't create a new request. How can i do the change inside our productive system?? exist a tool for do this??

 

Regards

 

Gregory

How to add custom button to an ABAP query?

$
0
0

hi

we have couple of ABAP query displaying output in ALV. We want put a custom button on the output so that the user can select some of the records and perform further actions on them.

basically we want to make the abap query interactive. Any idea how to achieve this? my understanding is the GUI status is automatically created.

 

Thanks in advance.

SRM Contract change using BBP_PD_CTR_UPDATE

$
0
0

Dear Experts,

 

I am trying to update the created SRM contracts through a upload program using BAPI BBP_PD_CTR_UPDATE.

 

I am able to update all fields in header and item level except ITEM STATUS field. The field in I_ITEM table is ITM_RELEASED which I am trying to make as "space"(Means item should be made inactive). The field in contract is currently active X (Item is active).

 

But I am getting below error - "Status and active flag in one item do not match"

 

Can you please suggest if anyone has faced similar issue, or if I am missing something while updating the item status ?

 

Thanks in advance!

 

 

Thanks

Sagar

Viewing all 8332 articles
Browse latest View live


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