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

VL10D y VL10B exit

$
0
0

Hi:

 

I need to call a proxy in a user exit, customer-exit, badi,etc. for VL10D and VL10B transactions before commit and I send data of the delivery.

 

Otherwise I need to set a field in the LIPS Field (por example LIPS-KDMAT) when the data is sended.

 

Solutions:

 

1.Badi:

 

LE_SHP_DELIVERY_PROC-SAVE_DOCUMENT_PREPARE


User exit:


SAPMV50A - USEREXIT_SAVE_DOCUMENT_PREPARE

 

The field VBELN is not complete.

 

2. Badi

LE_SHP_DELIVERY_PROC-SAVE_AND_PUBLISH_BEFORE_OUTPUT

 

User exit:

 

MV45AFZZ - userexit_save_document

 

The field VBELN is complete, but I can't change the LIPS-KDMAT fields.

 

3. Create structure append in the LIPS table and insert the value in the badi LE_SHP_DELIVERY_PROC-SAVE_AND_PUBLISH_BEFORE_OUTPUT.

 

 

Please, I need to help me.

 

Thank you.

 

Regards,

Jorge.


VA01/VA02 Exit MV45AFZZ Additional data B - Error check

$
0
0

Hello!

 

I added 2 custom fields at Additional Data B (Dynpro SAPMV45A/8309). They will be updated through VA01 and VA02 t-codes, under some conditiones. This works fine.

I put a check at MV45AFZZ User-Exit with the fields I told you before. When I execute VA02 for example, the validation works fine: the fields are ready for input and the error message is shown (message type E) when it has to. But when y press ENTER accepting the error message, both fields keep unable for input and I need them to be ready for input again because the PO won't be save until I enter some data on it.

 

The exit code is at USEREXIT_SAVE_DOCUMENT_PREPARE form. I also tried at USEREXIT_SAVE_DOCUMENT form.

 

Any idea if I have done something wrong?

 

Thanks n advance and kind regards!

Creation of Idoc using custom program

$
0
0

I have a requirement to create IDOC for a Mat Doc (MB1A) from Flat file from Application server, Please guide me how to go about.

Please give me steps and dummy program.

 

Will reward points.

 

With Regards,

Bala. M

Exception Class Text Translation

$
0
0

Hey,

 

I'm hoping someone will be able to help me with this... I have an exception class with texts set up for various errors. I have translated those texts in SE63 (OTR texts) and if I log in to the system in French and look at the texts in the class it shows the texts in French.

 

My problem is that when I use the GET_TEXT method in a web dynpro application, regardless of what language I am logged in with, I get the English texts...


Any help would be greatly appreciated! Let me know if you need more details.

OPEN DATASET statement

$
0
0

Hi experts,

 

How can I identify when I need to use "Encoding Default" or not in a OPEN DATASET statement?

I tried to see the version of my system, but both that I have are ECC 6, and both are No-Unicode, but one of them need to insert the ENCODING DEFAULT and the other don't.

 

Ex:

OPEN DATASET vl_archive FOR OUTPUT IN TEXT MODE.

or

OPNE DATASET vl_archive FOR OUTPUT IN TEXT MODE ENCODING DEFULT.

Thanks for your help!

 

Best Regards

Victor Marquise

Pressing enter in customer data tab not reflecting changes in PAI of the Module Pool in ME22N,ME23N

$
0
0

Hi I am back with another query.

 

 

Not I have added my custom fields on screen. But when the user does some action on the screen in those fields by pressing enter the value either gets removed or brings the old database value.

 

I need to check when the user presses enter on any of the custom fields in my customer data tab in ME21N,ME22N,ME23N.

 

When i tried to debug the standard there is no sy-ucomm value or ok_code meaning both the variables are blank.

 

so help me in catching when the user presses the enter button on screen

 

 

thanks in advance.

Table information needed for a structure.

$
0
0

Does any body know what table is data stored for RV45A-ASTTX for both Header and Item please? Thanks.

Two Schedule Lines getting generated from an Inbound IDOc.

$
0
0

Hi kindly guide in identifying and rectifying the problem. As of now the sales contract is getting updated with two Schedule Line Items which it shouldn't.

 

For Changing the Sales Contract BAPI_SALESORDER_CHANGE is called and when i see the importing parameters everything is ok but when i view the sales contract i see double schedule lines.

 

help me out pls..

 

thanks.


SELECT Statement in Native SQL and Open Sql ( ABAP Select)

$
0
0

Can anybody please tell the differences between the Select Statement in ABAP and In Native SQL ?

 

I have worked with SQL Server for more than 3 years. Sometimes i get confused about the behavior of SELECT statement in ABAP. I try to compare the SELECT in SQL SERVER and SELECT in ABAP.. and result is confusion in many scenarios ..

 

So anybody who can explain them better please reply to this post and share your knowledge ..

Entries in Transaction SM58 are in status "Transaction recorded"

Problem in declaring variables in TOP include and accessing them

$
0
0

Hi Guys,

I am implementing Enhancement MEREQ001 and facing problem in declaring the variables and accessing them in the other includes.

 

Function Pool: SAPLXM02

*******************************************************************
*   System-defined Include-files.                                 *
*******************************************************************  INCLUDE LXM02TOP.                          " Global Data  INCLUDE LXM02UXX.                          " Function Modules

*******************************************************************
  INCLUDE LXM02F00.                        " SAP-Formpool for Customer-Use  INCLUDE ZXM02ZZZ.                        " Subprograms and Modules

 

Include: ZXM02TOP .

*----------------------------------------------------------------------*
***INCLUDE ZXM02TOP .
*----------------------------------------------------------------------*
DATA:  g_pramt LIKE eban-preis.
DATA:  g_poamt LIKE eban-preis.

 

Include:  ZXM02O01

*----------------------------------------------------------------------*
***INCLUDE ZXM02O01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  STATUS_0111  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0111 OUTPUT.

IF g_poamt GT  2000.

Endif.     

ENDMODULE.                 " STATUS_0111  OUTPUT

 

 

When I syntex check (Ctrl+F2) the program, it gives me the following error (RED) message.

The field u201CG_POAMTu201D is unknown, but there is field with similar name G_PRAMT.

When I forward navigate by double clicking g_poamt, it takes me to ZXM02TOP.

 

But when I try to activate it, the include is activated without giving any error message or warning.

 

I donu2019t know why system is not seeing G_POAMT. But it is seeing G_PRAMT.

What should I do to rectify this problem.

 

Thanks in advance.

problem in smartforms

$
0
0

Hi all i have a smartform in which i need a requirement that if all the internal fields of the three fields( Previous Bill, Current Bill, Cumulative Bill) remains blank,Then the first four fields( SL NO, Service Number, Service Description, and Service Specification) also remains blank .

 

I have used the condition Like ,it_item-sl_no NE 0. in condition. but not getting the desired output,please sujjest me how to get these four field also blank if

all the values related to it are blank.

Trigger workflow when a record is created in a database table .

$
0
0

I am try to completed following tutorial in sap technical .com

 

http://****************/Tutorials/Workflow/Table/events.htm.

 

but when i try to insert new entry in to table ZEMPDETAIL saving time it will pop up

following error Description. (attached Error.txt)


then I checked and all re activated allsubroutine, include and functional groups. this error popup

inside the  UPDATE_TAB subroutine following statement.


IF x_header-frm_on_new NE space.

   PERFORM (x_header-frm_on_new) IN PROGRAM.             "Zp 05

ENDIF.

 




Issue in smartform

$
0
0

Hi All,

 

When i m selecting 7.00 which is shown in attached screen it gives error.

But when i selecting 2.00 instead of 7.00 it didnt give any error.

Can u please suggest needful???

 

Thanks

Modify Column attributes in the Table Maintenance Generator

$
0
0

I have an existing Table Maintenance View that was built earlier for a custom table. 

 

1st requirement: make BRAND, PROGRAMID, and PROGNAME all required fields (the row should not be saved without a non-blank, non-null entry being put in any of these columns).  Currently, you can enter data in some and leave one or more blank.

 

2nd requirement: PROGRAMID should not allow any duplicate values.

 

On the Fields tab of this table, MANDT, BRAND, and PROGRAMID are selected for Key and Initial Value.

 

How can I adjust the TMG to meet these requirements?

Thank you

 

dictionary shot.jpg


Exception Class Help

$
0
0

Hi Experts,

 

I need some advice on why my exception is not getting caught. Here are the details.

 

Exception Class:  ZCX_BW_SD_CODE

 

class ZCX_BW_SD_CODE
definition
public
inheriting from CX_STATIC_CHECK
final
create public .
public section.
*"* public components of class ZCX_BW_SD_CODE
*"* do not include other source files here!!!

constants ZCX_BW_SD_CODE type SOTR_CONC value '1F47B9514EDAE054E1000000AC13310E'.
"#EC NOTEXT
constants NO_DATA_SP type SOTR_CONC value '1F49B9514EDAE054E1000000AC13310E'. "#EC
NOTEXT
constants NO_ORDER_DATA_SP type SOTR_CONC value '2248B9514EDAE054E1000000AC13310E'.
"#EC NOTEXT
data REQUEST type RSREQUEST .
data PACKET type RSDATAPID .
data RECORD type RSARECORD .
data SDORDER type /BI0/OIDOC_NUMBER .
data SDORDERLINE type /BI0/OIS_ORD_ITEM .
data GT_BSARKSD type /BI0/OIGT_BSARKSD .
data DISTR_CHAN type /BI0/OIDISTR_CHAN .

 

Exception is raised in a method ZCL_BW_SD_CODE->GET_ORDERS

 

methods GET_ORDERS
importing
!I_T_SP type ANY TABLE
!I_PACKET type RSDATAPID
raising
resumable(ZCX_BW_SD_CODE) .

 

METHOD get_orders.
...
IF i_t_sp IS INITIAL.
RAISE EXCEPTION TYPE zcx_bw_sd_code
EXPORTING
textid = zcx_bw_sd_code=>no_data_sp
packet = i_packet.
ELSE.
...
ENDMETHOD.

 

I'm calling this method in the start routine of a BW 7.0 Transformation.

 

...

    DATA: gl_cx TYPE REF TO zcx_bw_sd_code,
                gcl_sdcode TYPE REF TO zcl_bw_sd_code.
    DATA: gv_text TYPE string.

....

* Load Sale Order
lookup table in SD code class
TRY.
CALL METHOD gcl_sdcode->get_orders
EXPORTING
i_t_sp = SOURCE_PACKAGE[]
i_packet = datapackid.
* If there is no SD Order data selected than raise an error.
*Always need to have reference SD order data and data in Source Package.

CATCH zcx_bw_sd_code INTO gl_cx. <-----NOT CATCHING THE EXCEPTION HERE
gv_text = gl_cx->get_text( ).

monitor_rec-msgid = 'Z001'.
monitor_rec-msgty = 'I'.
monitor_rec-msgno = 040.
monitor_rec-msgv1 = gv_text.
APPEND monitor_rec TO MONITOR
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDTRY.

...

If I type gl_cx as cx_root the it catches but I'm not sure why it won't catch zcx_bw_sd_code.  Thank you in advance for any help.

Regards,

Dae Jin

Verifying a signature with included certificate

$
0
0

Hello, 

 

I am faced with some problems while verifying signed data.    

 

So far I have created a new PSE and generated a certificate request. This request has been used in the SAP support portal to create a test certificate. The resulting response has been imported into the PSE as well as the corresponding root certificate. This modified PSE is used to sign and verify some data. But verification is only possible when option "include certificate" (B_INC_CERT) is set to FALSE for function SSF_KRN_SIGN. Otherwise I get an error "signer or recipient is unknown" (CRC = 5) in function SSF_KRN_VERIFY. Does somebody know what I am doing wrong? I am usingSAPSECULIB (SSFLIBSO Version 1.555.26 ; SECUDE(tm) Version 5.4.28M-6 Copyright (c) SECUDE GmbH 1990-2007 #SAPSECULIB - digital signature / without encryption##compiled for Windows  9x/ME/NT/2K/XP/2K3  (32-bit x86)##)  

 

My second question, how do I use function SSF_KRN_VERIFY (especially the mandatory fields for the private address book) to verify a signature on a second SAP system while using the included certificate information in the signature (without having to exchange public key information first)? 

 

Regards,

Melanie

ABAP - Module Program Text Labels

$
0
0

Dear All

 

My requirement is as follows:

 

We have developed on Module program to accept some custom data.  That screen is having a header and table container.

 

Each field is having the Label as Text..  We put the label in English... 

 

However, the requirement is that, when the client logged in Arabic language, the labels should be displayed in Arabic

 

I was trying to associate the text-XXX symbols..  But not working..  do not know where I am missing..

 

Can someone help me

 

Regards,

Venkat

function module within loop

$
0
0

HI ,

 

I am using fuction module within loop

which is taking lots of time please tell me any trick how to do fast processing

my code is

 

LOOP AT IT_HD INTO WA_HD .

     var = var +  1.

     CALL FUNCTION 'BBP_PD_SC_GETDETAIL'

       EXPORTING

         I_GUID    = WA_HD-GUID

       IMPORTING

         E_HEADER  = E_HEADER

       TABLES

         E_ITEM    = E_ITEM

         E_ACCOUNT = E_ACCOUNT

         E_PARTNER = E_PARTNER

         E_STATUS  = E_STATUS .

   delete E_STATUS WHERE INACT 'X'.

   READ TABLE  E_STATUS INTO  WA_STATUS INDEX 1.

   select single TXT30 from TJ02T into TXT30 WHERE  ISTAT =   WA_STATUS-STAT and SPRAS = 'E'.

 

      loop at E_ITEM INTO WA_ITEM .

     READ TABLE  E_PARTNER INTO  WA_PARTNER WITH KEY PARTNER_FCT = '00000019'.

 

       READ TABLE IT_ORG INTO WA_ORG WITH KEY BE_PUR_GROUP  = WA_ITEM-BE_PUR_GROUP

                                                BE_PUR_ORG = WA_ITEM-BE_PUR_ORG

                                                BE_CO_CODE  = WA_ITEM-BE_CO_CODE.

       IF SY-SUBRC = 0.

         IF E_HEADER-POSTING_DATE IN  POS_DATE.

           SELECT SINGLE  BE_OBJECT_ID FROM BBP_PDBEI INTO WA_SC-BE_OBJECT_ID WHERE GUID = WA_ITEM-GUID.

           SELECT SINGLE NAME_ORG1 FROM BUT000 INTO WA_SC-NAME_ORG1 WHERE PARTNER_GUID  WA_PARTNER-PARTNER_NO .

         ENDIF.

 

             READ TABLE  E_PARTNER INTO  WA_PARTNER WITH KEY PARTNER_FCT = '00000019'.

           WA_SC-ZZSOCOREQ = TXT30.

 

         READ TABLE E_ACCOUNT INTO WA_ACCOUNT INDEX 1 .

         CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'

           IMPORTING

             OWN_LOGICAL_SYSTEM = SYST_ID.

         .

         SELECT  SINGLE RFC_SYS FROM ZLOGICAL_SYS INTO RFC_SYS WHERE OWN_SYS = SYST_ID.

         IF SY-SUBRC = 0.

           CALL FUNCTION 'Z_SRM_PO_INFO' DESTINATION RFC_SYS

             EXPORTING

               BE_OBJECT_ID = WA_SC-BE_OBJECT_ID

               GL_CODE      = WA_ACCOUNT-G_L_ACCT

               COST_CTR     = WA_ACCOUNT-COST_CTR

               FUND         = WA_ACCOUNT-FUNDs_ctr

             IMPORTING

               AEDAT        = WA_SC-AEDAT

               GL_CODE_DES  = WA_SC-GL_CODE_DES

               C_C_D        = WA_SC-C_C_D

               FUND_DES     = WA_SC-FUND_DES.

           .

 

           CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

             EXPORTING

               INPUT         WA_ITEM-ORDERED_PROD

            IMPORTING

              OUTPUT        =    WA_ITEM-ORDERED_PROD

                     .

 

           WA_SC-CREATED_BY = WA_HD-CREATED_BY .

           WA_SC-POSTING_DATE  E_HEADER-POSTING_DATE .

           WA_SC-BE_PUR_GROUP = WA_ITEM-BE_PUR_GROUP .

           WA_SC-BE_PUR_ORG   =   WA_ITEM-BE_PUR_ORG .

           WA_SC-BJECT_ID E_HEADER-OBJECT_ID .

           WA_SC-DESCRIPTION E_HEADER-DESCRIPTION.

           WA_SC-ORDERED_PROD = WA_ITEM-ORDERED_PROD.

           WA_SC-DESCRIPTION1 WA_ITEM-DESCRIPTION.

           WA_SC-QUANTITY     =   WA_ITEM-QUANTITY .

           WA_SC-CTR_HDR_NUMBER =   WA_ITEM-CTR_HDR_NUMBER .

           WA_SC-CTR_ITEM_NUMBER =   WA_ITEM-CTR_ITEM_NUMBER .

           WA_SC-CURRENCY    WA_ITEM-CURRENCY .

           WA_SC-GROSS_PRICE    WA_ITEM-PRICE *  WA_ITEM-QUANTITY.

           WA_SC-ACC_CAT  WA_ACCOUNT-ACC_CAT.

           WA_SC-COST_CTR  = WA_ACCOUNT-COST_CTR.

           WA_SC-ORDER_NO WA_ACCOUNT-ORDER_NO.

           WA_SC-NETWORK  = WA_ACCOUNT-NETWORK.

           WA_SC-ACTIVITY = WA_ACCOUNT-ACTIVITY.

           WA_SC-FUND  WA_ACCOUNT-FUNDs_ctr.

           WA_SC-ZZPRODUCT = WA_ACCOUNT-ZZPRODUCT.

           WA_SC-GL_CODE = WA_ACCOUNT-G_L_ACCT .

           IF  G_L_ACCT IS NOT INITIAL AND COST_CTR IS NOT INITIAL .

             READ TABLE E_ACCOUNT INTO WA_ACCOUNT INDEX 1.

             IF WA_ACCOUNT-G_L_ACCT = G_L_ACCT  AND WA_ACCOUNT-COST_CTR COST_CTR.

 

               APPEND WA_SC TO IT_SC .

                  ENDIF .

           ENDIF .

           IF  G_L_ACCT IS NOT INITIAL AND COST_CTR IS INITIAL .

             READ TABLE E_ACCOUNT INTO WA_ACCOUNT INDEX 1.

             IF WA_ACCOUNT-G_L_ACCT = G_L_ACCT  .

 

               APPEND WA_SC TO IT_SC .

 

 

             ENDIF .

           ENDIF .

           IF  G_L_ACCT IS INITIAL AND COST_CTR IS NOT INITIAL .

             READ TABLE E_ACCOUNT INTO WA_ACCOUNT INDEX 1.

             IF WA_ACCOUNT-COST_CTR = COST_CTR.

 

               APPEND WA_SC TO IT_SC .

 

             ENDIF .

           ENDIF .

           IF  G_L_ACCT IS INITIAL AND COST_CTR IS  INITIAL .

 

             APPEND WA_SC TO IT_SC .

 

 

           ENDIF .

         ENDIF .

       ENDIF .

 

   ENDLOOP .

    ENDLOOP .

How to put more than 1 int. table contents into a single table

$
0
0

Hi ABAP Gurus,

 

Looking for not making redundant in the code , sceario is like this ,

 

 

1. extracting contents from diff tables like mara, marc, mard ......etc into corresponding int tables..

2. Need to write common subroutine to pull these data and put it into single table or field smbol ..

 

so I am aimimg to call a common subroutine after each table extraction into corresponding int table...

 

Appreciate your advise , if there is best way to do ..

 

Kind Regards

Rama

Viewing all 8332 articles
Browse latest View live


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