Quantcast
Channel: SCN : Unanswered Discussions - ABAP Development
Viewing all 8768 articles
Browse latest View live

Shared Memory Concept Issue on multiple application server

$
0
0

Hi Experts,

 

I am using shared memory concept because of deep structure in one proxy service code to change it from dialog mode to background mode by submitting the program.

It is working fine when system have one applications server and raising exception cx_shm_no_active_version when running on multiple server systems.

 

As per my understanding issue occured because instance is created on one server and background program is running on another server. What is the best possible way to handle it? is there any way we can force the instance creation and background program to run on same server to save application server memory?

 

if answer is to create instance on all server then please shared the logic or way to do it.

 

Regards,

Ankur


Validating sold-to-party field with order type and sales org in va01 transaction

$
0
0

Hi,

 

I have been assigned a task in VA01 sales order creation transaction. The validation for order type and sales organization fields with the sold-to-party field combination has to happen only when the sold-to-party is entered. Here I have to bring 3 error messages separately.

 

I created a dedicated customer (sold-to-party) and a sales org linked only with this customer. but using an already existing order type.

 

Error message situations:

 

1. When sold-to-party does not match with the sales org and order type.

2. When sold-to-party and sales org are correct but order type does not match with both .

3. When sold-to-party and order type matches but sales org does not match.

 

I need the select query to check all 3 conditions and display error messages for all 3 separately

 

Thanks and Regards,

Mahesh.

print data only in it_ekko ebeln

$
0
0

hello all,

 

this is my code i wants to print only i want apply sort data using s_bednr in ekpo table.

 

REPORT  ZSTOCK_TRANSFER_REPORT.

 

 

TABLES: EKPO , EKKO ,VBRP.

 

 

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.

PARAMETERS:      p_CCODE   TYPE  EKPO-BUKRS OBLIGATORY Default 1100,

                  p_PCODE   TYPE  EKPO-WERKS OBLIGATORY Default 1111.

SELECT-OPTIONS : S_MATNR   FOR   EKPO-MATNR ,

                  S_BEDNR   FOR   EKKO-AEDAT DEFAULT 'sy-datum'.

SELECTION-SCREEN END OF BLOCK b1.

 

type-pools : SLIS.

 

 

DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,

       GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,

       GD_REPID     LIKE SY-REPID,

       G_SAVE TYPE C VALUE 'X',

       G_VARIANT TYPE DISVARIANT,

       GX_VARIANT TYPE DISVARIANT,

       G_EXIT TYPE C.

 

 

 

TYPES : BEGIN OF STR_EKPO,

   EBELN TYPE EKPO-EBELN,

   PRDAT TYPE EKPO-PRDAT,

   MATNR TYPE EKPO-MATNR,

   TXZ01 type EKPO-TXZ01,

   BUKRS TYPE EKPO-BUKRS,

   WERKS TYPE EKPO-WERKS,

   MENGE TYPE EKPO-MENGE,

   NETPR TYPE EKPO-NETPR,

   NETWR TYPE EKPO-NETWR,

   END OF STR_EKPO.

 

DATA : IT_EKPO TYPE STANDARD TABLE OF STR_EKPO,

        WA_EKPO TYPE STR_EKPO.

 

TYPES : BEGIN OF STR_EKKO,

   EBELN TYPE EKKO-EBELN,

   BUKRS TYPE EKKO-BUKRS,

   AEDAT TYPE EKKO-AEDAT,

   EKORG TYPE EKKO-EKORG,

   END OF STR_EKKO.

 

DATA : IT_EKKO TYPE TABLE OF STR_EKKO,

        WA_EKKO TYPE STR_EKKO.

 

TYPES : BEGIN OF STR_VBRP,

   VBELN TYPE VBRP-VBELN,

   FKIMG TYPE VBRP-FKIMG,

   MATNR TYPE VBRP-MATNR,

   NETWR TYPE VBRP-NETWR,

   ERDAT TYPE VBRP-ERDAT,

   END OF STR_VBRP.

 

DATA : IT_VBRP TYPE TABLE OF STR_VBRP,

        WA_VBRP TYPE STR_VBRP.

 

 

DATA : PEND_QTY TYPE EKPO-MENGE,

        PEND_AMT TYPE EKPO-NETWR,

        BAL_QTY TYPE EKPO-MENGE,

        BAL_AMT TYPE EKPO-NETWR.

 

 

 

  TYPES : BEGIN OF STR_FINAL ,

    EBELN TYPE EKPO-EBELN,

    PRDAT TYPE EKPO-PRDAT,

    MATNR TYPE EKPO-MATNR,

    TXZ01 TYPE EKPO-TXZ01,

    MENGE TYPE EKPO-MENGE,

    NETPR TYPE EKPO-NETPR,

    NETWR TYPE EKPO-NETWR,

    VBELN TYPE VBRP-VBELN,

    FKIMG TYPE VBRP-FKIMG,

    NETWR1 TYPE VBRP-NETWR,

    ERDAT TYPE VBRP-ERDAT,

    PEND_QTY TYPE EKPO-MENGE,

    PEND_AMT TYPE EKPO-NETWR,

    BAL_QTY TYPE EKPO-MENGE,

    BAL_AMT TYPE EKPO-NETWR,

    END OF STR_FINAL.

 

DATA : IT_FINAL TYPE TABLE OF STR_FINAL,

          WA_FINAL TYPE STR_FINAL.

 

 

 

 

PERFORM GET_DATA.

PERFORM PERFORM_DATA.

PERFORM CAL_DATA.

PERFORM BUILD_FIELDCATALOG.

PERFORM DISPLAY_DATA.

 

.

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

*&      Form  GET_DATA

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

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM GET_DATA .

 

SELECT  EBELN PRDAT MATNR TXZ01 BUKRS WERKS  MENGE NETPR NETWR

   FROM EKPO

   INTO CORRESPONDING FIELDS OF TABLE  IT_EKPO

   WHERE MATNR IN S_MATNR

   AND   BUKRS EQ P_CCODE

   AND   WERKS EQ P_PCODE.

 

   SELECT EBELN BUKRS AEDAT EKORG

     FROM EKKO

     INTO CORRESPONDING FIELDS OF TABLE IT_EKKO

     FOR ALL ENTRIES IN IT_EKPO

     WHERE AEDAT IN S_BEDNR

     AND BUKRS EQ IT_EKPO-BUKRS

     AND EBELN EQ IT_EKPO-EBELN.

 

   SELECT VBELN FKIMG MATNR NETWR ERDAT

     FROM VBRP

     INTO CORRESPONDING FIELDS OF TABLE IT_VBRP

     FOR ALL ENTRIES IN IT_EKPO

     WHERE MATNR = IT_EKPO-MATNR

     AND WERKS = IT_EKPO-WERKS.

 

 

ENDFORM.                    " GET_DATA

 

 

 

 

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

*&      Form  PERFORM_DATA

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

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM PERFORM_DATA .

   LOOP AT IT_EKPO INTO WA_EKPO.

 

     READ TABLE IT_EKKO INTO WA_EKKO WITH KEY  EBELN = EKKO-EBELN  .

 

 

    WA_FINAL-EBELN  = WA_EKPO-EBELN.

    WA_FINAL-PRDAT  = WA_EKPO-PRDAT.

    WA_FINAL-MATNR  = WA_EKPO-MATNR.

    WA_FINAL-TXZ01  = WA_EKPO-TXZ01.

    WA_FINAL-MENGE  = WA_EKPO-MENGE.

    WA_FINAL-NETPR  = WA_EKPO-NETPR.

    WA_FINAL-NETWR  = WA_EKPO-NETWR.

 

 

    APPEND  WA_FINAL TO IT_FINAL.

CLEAR: WA_FINAL,

        WA_EKPO,

        WA_EKKO.

 

 

  ENDLOOP.

 

 

 

SORT IT_FINAL BY EBELN MATNR .

 

ENDFORM.                    " PERFORM_DATA

 

 

 

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

*&      Form  CAL_DATA

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

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM CAL_DATA .

 

 

ENDFORM.                    " CAL_DATA

 

 

 

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

*&      Form  DISPLAY_DATA

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

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM DISPLAY_DATA .

 

    GD_REPID = SY-REPID.

   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

     EXPORTING

       I_CALLBACK_PROGRAM      = GD_REPID

*      I_CALLBACK_TOP_OF_PAGE  = 'TOP-OF-PAGE'  "see FORM

*      I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

       IT_FIELDCAT             = FIELDCATALOG[]

       I_SAVE                  = 'X'

       IS_VARIANT              = G_VARIANT

     TABLES

       T_OUTTAB                = IT_FINAL

     EXCEPTIONS

       PROGRAM_ERROR           = 1

       OTHERS                  = 2.

   IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

   ENDIF.

 

ENDFORM.                    " DISPLAY_DATA

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

*&      Form  BUILD_FIELDCATALOG

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

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM BUILD_FIELDCATALOG .

 

   FIELDCATALOG-FIELDNAME   = 'EBELN '.

   FIELDCATALOG-SELTEXT_M   = 'PO NO'.

   FIELDCATALOG-COL_POS     = 0.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = 'PRDAT'.

   FIELDCATALOG-SELTEXT_M   = 'DATE'.

   FIELDCATALOG-COL_POS     = 1.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = 'MATNR'.

   FIELDCATALOG-SELTEXT_M   = 'MATERIAL CODE'.

   FIELDCATALOG-COL_POS     = 2.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = 'TXZ01'.

   FIELDCATALOG-SELTEXT_M   = 'PRODUCT NAME'.

   FIELDCATALOG-COL_POS     = 3.

   FIELDCATALOG-OUTPUTLEN   = 20.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = 'MENGE'.

   FIELDCATALOG-SELTEXT_M   = 'QUANTITY'.

   FIELDCATALOG-COL_POS     = 4.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = 'NETPR'.

   FIELDCATALOG-SELTEXT_M   = 'RATE'.

   FIELDCATALOG-COL_POS     = 5.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = 'NETWR'.

   FIELDCATALOG-SELTEXT_M   = 'VALUE'.

   FIELDCATALOG-COL_POS     = 6.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

   FIELDCATALOG-FIELDNAME   = ' '.

   FIELDCATALOG-SELTEXT_M   = 'EXC INVOICE'.

   FIELDCATALOG-COL_POS     = 7.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

    FIELDCATALOG-FIELDNAME   = ''.

   FIELDCATALOG-SELTEXT_M   = 'EXC DATE'.

   FIELDCATALOG-COL_POS     = 6.

   APPEND FIELDCATALOG TO FIELDCATALOG.

   CLEAR  FIELDCATALOG.

 

 

ENDFORM.



 

Maxmium number of implementations reached in migo

$
0
0

Message no. MIGO047 . Maximum number of BADI implementations in MIGO has been exceeded. I am trying to implement a badi in which i have to add a new tab but my badi seems to have already maximum number of implementation. Still searching for a solution.

TRANSFER adds additional CR Carriage Return

$
0
0

We have prepared a CSV string which has Carriage Return and Line Feed at the end of each line. However when we write to to DISK SAP/ABAP is adding an additional CR. Consider this code

 

   DATA(lv_filename) = '\\server\hot-import\test.csv'.

   OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE TYPE '' ENCODING DEFAULT.

   DATA(lv_csv) = 'hello' && cl_abap_char_utilities=>cr_lf && 'world'.

   TRANSFER lv_csv TO lv_filename NO END OF LINE.

   CLOSE DATASET lv_filename.


The result should be:

hello<cr><lf>

world


Instead we get:

hello<cr>

<cr><lf>

world

 

We've searched the forums but cannot find a similar issue. Using TYPE '' or not makes no difference. Neither does NO END OF LINE.

Select with calculation in function module

$
0
0

Hi All!

 

I have a function module which gathering data from a ztable.

 

My ztable:

001.jpg

I wanted to populate ZEYCARPAN field as "ZEYTUFE * ZEYGH" when I used SELECT statement.

 

Is it possible?

ALV Report Export button not working

$
0
0

Dear Gurus,

I am facing issue.

Its existing ALV zreport.

When report is executed , output occurs as alv grid.

When I try to export it by clicking on 'Export' Option it blinks option for export for less than 1 sec.

Before I could select any single, its going.

Same way when click 'Right Click' On alv output, the same option occurs and going.

Same way when click 'View', options are coming and going.

 

Please help me to understand where is the possibility of issue  and how to correct it.

 

Thanks,

Swapnil

Confirmed Quantities Operations

$
0
0

Hey SCN - experts,

 

I'm looking for a Function on how to find the confirmed yield per operation in a production order. The FM BAPI_PRODORD_GET_DETAIL does not give this information apparently.

 

We are trying to make a report where the quantities WIP between the operations can be shown but i can't seem to find a function or a table where this data is stored. I have been thinking about analysing the Confirmations, but this seems too farfetched for now. I'll keep this as a backup plan.

 

I really hope you can help me out.

 

Thank you very much!

 

KR

Guy


Change FI doc.type for Credit Memo in MIRO

$
0
0

Hi everyone,

 

I'm trying to change document type (BLART) in FI document created through MIRO when a Credit Memo is made.

 

I'm using method HEADER_DEFAULT_SET of BADI ZMRM_HEADER_DEFAULT but nothing changes. This is my code:

 

   FIELD-SYMBOLS: <fs_rbkpv> TYPE mrm_rbkpv.

   DATA: c_rbkpv(15) TYPE c VALUE '(SAPLMR1M)RBKPV'.

 

   CASE sy-tcode.

     WHEN 'MIR7' OR 'MIRO'.

       ASSIGN (c_rbkpv) TO <fs_rbkpv>.

       <fs_rbkpv>-blart = 'KG'.

   ENDCASE.


Any advice?


Thanks a lot!

BAPI triggers while PO create in SRM ABAP

$
0
0

Hello Gurus ,

 

I have a scenario where PO is getting automatically created from the Shopping Cart but the PO is coming different .

I need to change the PO type before the PO get creates in SRM . Can you tell me the BADI which get triggers when during PO creation . BBP_DOC_CHANGE will not help here as it is used for update .

 

Thanks & Regards

Anshuman

calling smartform in rfc fm

$
0
0

hi,

 

I have a requirement where i need to call a zpgm having ysf smartform in RFC fm.

I have to pass an importing parameter as invoice no. and when we execute the RFC , it should display the smartform in pdf format.

 

Please check the below link for ref.

Convert Smartform to PDF in Print Preview Mode

 

 

Please suggest how to achieve this and if possible can anybody share sample program.

 

Regards,

 

Khusboo

DOWNLOADING a package and its objects(tables,programs,FM,screens etc)

$
0
0

Hi guys

 

I need help asap.How do i download all contents of a package to my pc.I need to take all programs,tables ,function groups,screens etc.There is need to upgrade Live environment and we want to back up all Z programs and objects.How can i do this at once.

 

Regards

 

Rejo

Runtime Errors DBIF_RSQL_INVALID_RSQL

$
0
0

Hi

 

Runtime Errors         DBIF_RSQL_INVALID_RSQL

Except.                CX_SY_OPEN_SQL_DB

 

 

When I am hitting query as follows : -

 

 

 

SELECT MBLNR

             USNAM

       FROM MKPF

       INTO TABLE IT_MKPF

       WHERE MBLNR IN S_MBLNR.

DYNAMIC PUSH BUTTON IN TABLE CONTROL

$
0
0

Dear all

 

I have created table control wrf to data dictionary table and i have added new column PUSH button.

 

My requirement is

 

push button should enable whenever first coloumn of table has values for that row.

example , table control have only one row with value so first row only should have push button for remaining  rows it should invisible.

 

1    44444          66666    enabled push button    ------> because first column has values

2                                   disabled push button --------> no value in first column

 

 

 

Capture.PNG

 

i have tried but not working , here is my coding part

 

PROCESS BEFORE OUTPUT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TABZ'

   MODULE TABZ_INIT.

*&SPWIZARD: MODULE TABZ_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE TABZ_CHANGE_COL_ATTR.

   LOOP AT   G_TABZ_ITAB

        INTO G_TABZ_WA

        WITH CONTROL TABZ

        CURSOR TABZ-CURRENT_LINE.

*&SPWIZARD:   MODULE TABZ_CHANGE_FIELD_ATTR

 

     MODULE TABZ_MOVE.

     MODULE TABZ_GET_LINES.

   ENDLOOP.



MODULE TABZ_GET_LINES OUTPUT.

   G_TABZ_LINES = SY-LOOPC.

 

*  TABZ-COLS[10]-SCREEN.

FIELD-SYMBOLS : <wa_tabz1> type any TABLE,

                <wa_tabz2> type any ,

                <wa_tabz3> type any ,

                <wa_tabz4> type any ,

                <wa_tabz5> type any ,

<wa_tabz6> type any ,

<wa_tabz7> type any .

   ASSIGN TABZ-COLS TO <wa_tabz1>.

 

   LOOP AT <wa_tabz1> ASSIGNING <wa_tabz2> .

     ASSIGN COMPONENT 'SCREEN' OF STRUCTURE <wa_tabz2> TO <wa_tabz3>.

 

     ASSIGN COMPONENT 'NAME' OF STRUCTURE <wa_tabz3> TO <WA_TABZ4>.

 

     IF <wa_tabz4> = 'PUSH'.

 

        ASSIGN COMPONENT 'INPUT' OF STRUCTURE <wa_tabz3> TO <WA_TABZ5>.

        ASSIGN COMPONENT 'ACTIVE' OF STRUCTURE <wa_tabz3> TO <WA_TABZ6>.

        ASSIGN COMPONENT 'INVISIBLE' OF STRUCTURE <wa_tabz3> TO <WA_TABZ7>.

        IF  G_TABZ_WA-FILENAME IS NOT  INITIAL.

          <WA_TABZ5> = 1.

          <WA_TABZ6> = 1.

          <WA_TABZ7> = 'X'.

        ELSE.

          <WA_TABZ5> = 0.

          <WA_TABZ6> = 0.

          <WA_TABZ7> = 'X'.

 

        ENDIF.

       ENDIF.

 

     ENDLOOP.

 

   FIELD-SYMBOLS : <wa_tabz> type any.

 

   ASSIGN TABZ TO <WA_TABZ>.

   ASSIGN COMPONENT 'INVISIBLE' OF STRUCTURE TABZ TO <WA_TABZ>.

   IF RAD2 EQ 'X'.

   <WA_TABZ> = ''.

   ELSE.

     <WA_TABZ> = 'X'.

   ENDIF.

 

 

 

 

ENDMODULE.

 

How to achieve this

 

thanks

Edit a line on alv tree

$
0
0

hey guys

how can i edit a line on alv tree,

thanks


swc_set_element set container element values that are ranges?

$
0
0

Hi all,

 

I can easily set a container element simple value by using this example statement.

 

swc_set_element container 'elementname' elementvalue.

elementvalue could be for example 10

 

How can I set a range value? for example from 10 to 100?

 

Thanks

Error RW609 in BAPI_ACC_INVOICE_RECEIPT_POST

$
0
0

HI,

I have a requirement to to perform vendor clearing, Tcode F-44 for multiple accounts, the data will be fetched from excel file.

 

I am trying to find a bapi for that.

I tried

BAPI_ACC_INVOICE_RECEIPT_POST

BAPI_ACC_DOCUMENT_POST.

 

but i get the same error.

RW 609.

 

Please help me out.

  1. I am attaching my input parameteraccountgl.PNGcurrencyamount.PNGretutn.PNGsdocument header.PNGaccountpayable.PNG

DART 2.6 implementation results in error via Note 1173540

$
0
0

Hi Friends ,

I am also upgrading DART version from 2.4 to 2.6 via 2.5  by implementing SAP NOTES . I have successfully implemented from 2.4 to 2.5 but when applying SAP NOTE 1173540 it gives me errors . When i checked i found that all the errors are coming from only function group TXW5 .

Can yu please suggest how you have implemented DART 2.6 . I am working on this since 2 months but i am clueless , every time when i apply note 117350 , objects of function group TXW5 results into error . Please sueesgt .I desperately seeking help if any one has implementing DART 2.6 .


Thanks,

Amit

Dump on accessing A005 Pricing Table in SAP ABAP

$
0
0

Hello All,

 

     I am getting a dump on accessing the table A005 in production.

 

dump.JPG

Deveploment app in WebDynpro

$
0
0

Hello Experts,

 

I'm trying to develop on app in WebDynpro.
I need to know if is possible to use oData in this app ?

 

The idea is to create a Web Dynpro application similar to an application of SAPUI5.

 

Thanks for your time ,

Best Regards

Cristina Rodrigues

Viewing all 8768 articles
Browse latest View live


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