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

Refresh the oops ALV display

$
0
0

Hi everybody,

I am using the oops ALV to display a report based on the some input data, for the first time the data is getting displayed correctly,

when the back button is pressed and the input data is changed the content displayed is not getting changed i am getting the previous content display only.

 

can anyone help me how to do display updated data in the ALV for the changed input data.


Can a table control cell be made Red ?

$
0
0

I have a query that can we change the coloue of a table control cell ?

 

Thanks

if error occurs in USEREXIT_CHECK_VBAP MV45AFZB stop sales order processing

$
0
0

Hello,

 

My requirement is to check if the contion type Z**** is present in sales order then it should display and error message and should not allow user to create sales order.

 

Currently it is only displaying an error message but if again we press enter then it will allow user to save the sales order even though the error persist.

Few months back it was working properly.

 

Could anyone please help me in solving this.

 

Thanks,

Komal.

I am Unable to Change the leave request after approved by manager

$
0
0

Hi Experts,

 

In Portal, Employee trying to Change the leave request  which was approved by manager.

Its throwing an Error as 'Absence type allowed with existing Absence type'. How to reslove this issue ?

 

My system version is EHP5.

 

Thanks and Regards

Dinesh Sivaprakasam

some problems in my bdc program for mm02

$
0
0

records are not changing in mm02 after successfull execution of my following program-->

 

report ZBDCNEWMM02

        no standard page heading line-size 255.

 

DATA: BEGIN OF it_data OCCURS 0,

       MATNR TYPE MARA-MATNR,

       DESC TYPE MAKT-MAKTX,

   END OF IT_DATA.

 

DATA IT_BDCDATA TYPE STANDARD TABLE OF BDCDATA WITH HEADER LINE.

 

 

 

start-of-selection.

   CALL FUNCTION 'GUI_UPLOAD'

     EXPORTING

       filename            = 'D:\BDC.TXT'

       HAS_FIELD_SEPARATOR = 'X'

     TABLES

       data_tab            = IT_DATA[].

 

   IF sy-subrc <> 0.

   ENDIF.

 

   perform open_group.

 

   LOOP AT IT_DATA.

     perform bdc_dynpro      using 'SAPLMGMM' '0060'.

     perform bdc_field       using 'BDC_CURSOR'

                                   'RMMG1-MATNR'.

     perform bdc_field       using 'BDC_OKCODE'

                                   '=ENTR'.

     perform bdc_field       using 'RMMG1-MATNR'

                                   IT_DATA-MATNR.

     perform bdc_dynpro      using 'SAPLMGMM' '0070'.

     perform bdc_field       using 'BDC_CURSOR'

                                   'MSICHTAUSW-DYTXT(01)'.

     perform bdc_field       using 'BDC_OKCODE'

                                   '=ENTR'.

     perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'

                                   'X'.

     perform bdc_dynpro      using 'SAPLMGMM' '4004'.

     perform bdc_field       using 'BDC_OKCODE'

                                   '=BU'.

     perform bdc_field       using 'BDC_CURSOR'

                                   'MAKT-MAKTX'.

     perform bdc_field       using 'MAKT-MAKTX'

                                   IT_DATA-DESC.

     perform bdc_transaction using 'MM02'.

   ENDLOOP.

 

   perform close_group.

 

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

*&      Form  OPEN_GROUP

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

*       text

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

*  -->  p1        text

*  <--  p2        text

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

FORM OPEN_GROUP .

   CALL FUNCTION 'BDC_OPEN_GROUP'

     EXPORTING

       CLIENT = SY-MANDT

       GROUP  = 'SESSION'

       KEEP   = 'X'

       USER   = SY-UNAME.

   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.                    " ZOPEN_GROUP

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

*&      Form  BDC_DYNPRO

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

*       text

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

*      -->P_0057   text

*      -->P_0058   text

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

FORM BDC_DYNPRO  USING   PROGRAM DYNPRO.

   CLEAR IT_BDCDATA.

 

   IT_BDCDATA-PROGRAM = PROGRAM.

   IT_BDCDATA-DYNPRO = DYNPRO.

   IT_BDCDATA-DYNBEGIN = 'X'.

 

   APPEND IT_BDCDATA.

 

ENDFORM.                    " BDC_DYNPRO

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

*&      Form  BDC_FIELD

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

*       text

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

*      -->P_0062   text

*      -->P_0063   text

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

FORM BDC_FIELD  USING FLDNAM FLDVAL.

   CLEAR IT_BDCDATA.

 

   IT_BDCDATA-FNAM = FLDNAM.

   IT_BDCDATA-FVAL = FLDVAL.

 

   APPEND IT_BDCDATA.

 

ENDFORM.                    " BDC_FIELD

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

*&      Form  BDC_TRANSACTION

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

*       text

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

*      -->P_0117   text

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

FORM BDC_TRANSACTION  USING    TCOD.

 

   CALL FUNCTION 'BDC_INSERT'

     EXPORTING

       TCODE     = 'MM02'

     TABLES

       DYNPROTAB = IT_BDCDATA[].

 

   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.                    " BDC_TRANSACTION

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

*&      Form  CLOSE_GROUP

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

*       text

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

*  -->  p1        text

*  <--  p2        text

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

FORM CLOSE_GROUP .

   CALL FUNCTION 'BDC_CLOSE_GROUP'

* EXCEPTIONS

*   NOT_OPEN          = 1

*   QUEUE_ERROR       = 2

*   OTHERS            = 3

             .

   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.                    " CLOSE_GROUP

Credit Block via User Exit at Line Item

$
0
0

Hi Experts,

 

I want to know if it is possible to block PO's and Goods Receipts in the includes file LVKMPFZ3 based on VBEP-LIFSP (schedule line block).

I am trying to stop any PO or Goods Receipt for a client that has exceeded his/her credit limit.  If there is a sales order created (VA01)  or modified (VA02)

I am running the user-exit listed above.  I am trying to use VBEP-LIFSP because I have other systems that interface with SAP and currently are coded for that block.  I am checking BSID and present VBAP for orders that have not invoiced and adding that total to the sales order in question line by line.  So if a line item will surpasses the credit limit, I want the order blocked at that line and to ensure that no more PO's and or Goods Reciepts are able to go through for that customer.  Any help would be appreciated.

 

Best regards,

 

Doug

BAPI_PROCORD_CHECK_MAT_AVAIL affecting screen flow

$
0
0

I have a strange problem with this BAPI, which is called in a loop for several orders. The flow goes like this:

 

1. Program (report type with selection screen) starts, does some processing, and calls dynpro 0100 (which shows an ALV).

 

START-OF-SELECTION.

...

CALL SCREEN 0100.

 

 

2. On a certain PAI action on dynpro 0100, BAPI is called one or several times. Afterwards, dynpro 0200 is called (which shows another ALV).

 

MODULE user_command_0100.

...

CALL FUNCTION 'BAPI_PROCORD_CHECK_MAT_AVAIL'

...

CALL SCREEN 0200.

...

ENDMODULE.

 

 

3. When trying to exit dynpro 0200, LEAVE TO SCREEN 0 does NOT display calling dynpro 0100, but leaves way back to selection screen!

 

MODULE user_command_0200.

...

LEAVE TO SCREEN 0. "This goes to "CALL SCREEN 0200" point, but afterwards instead of triggering 0100 PBO, leaves screen 0100 also

...

ENDMODULE.

 

 

This problems do NOT occur when not calling this BAPI, so I'm 100% sure there's not a problem in the custom program regarding screen flow code.

I have a workaround already, which consists on forcing the next screen immediately after the call screen (with SET SCREEN 0100).

But I'm interested on the CAUSE of this behaviour! I've been unable to find it by debugging the BAPI, neither found any SMP notes on this issue.

Did anyone else experience this or something similar with another BAPI or function?

 

Thanks!

Transport version management check

$
0
0

Hi Experts,

 

I need to automate process of transport version management check.

 

To perform version checks for transports, we can compare development transport with production environment transport.

 

Then we check the difference and on that basis we decide if transport in development is built on correct transport of production.

 

Anybody has idea if we can automate this process to check if transport is built on correct version.

Thanks.

 

Regards,

Sanjana.


Field exits on NWBC

$
0
0

Good morning everybody:

 

My customer is considering upgrade the SAP GUI to NWBC, however they have a considerable number of validations using Field Exits. Do you know if there is any technical restriction for the use of Field Exits in NWBC or they will be working just like today in SAPGui?

 

Thanks

How to remove null characters at the end of my output file?

$
0
0

Hi Guys,

 

I am transfering data to a file using:

 

mydata is of type char.

 

TRANSFER mydata TO myfilename NO END OF LINE.

 

The problem is that the file contains null characters at the end.

 

How can I remove these characters before or while transfering the data.

 

After the transfer  I cannot have access to the file anymore. It has to happen before.

 

Please help.

Note 1760770 - Unable to change method visibility

$
0
0

Hello,

 

I am currently implementing note Note 1760770

 

It says :

Change method attributes:


1. Call transaction SE80. Select "Class / Interface" and enter CL_SEPA_MANDATES_ALV_GRID.

2. Expand the methods in the menu tree.

3. Click the method GET_SELECTED_MANDATES with the secondary mouse button.

4. In the context menu, choose "Change -> Definition".

5. Switch to the "Attributes" (or "Properties") tab page.

6. Change the visibility from "Private" to "Public".

7. Save and activate your changes.

 

 

But when I do so the visibilityis not available for change :

 

2013-07-18_1749-Note_1760770.png

 

How can I change it ?

I am not sure if disabling the assistant and doing the change directly in the private/public section is the right thing to do ?

 

Cheers, Manuel

devoloping the BDC For material schedule update for me38 but gives the error :-BDC_INSERT, session not opened

$
0
0

report ZBDC_ME38
        no standard page heading line-size 255.
*include bdcrecx1.
*parameters: dataset(132) lower case.
*** DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
*
*   If it is nessesary to change the data section use the rules:
*   1.) Each definition of a field exists of two lines
*   2.) The first line shows exactly the comment
*       '* data element: ' followed with the data element
*       which describes the field.
*       If you don't have a data element use the
*       comment without a data element name
*   3.) The second line shows the fieldname of the
*       structure, the fieldname must consist of
*       a fieldname and optional the character '_' and
*       three numbers and the field length in brackets
*   4.) Each field must be type C.
*
*** Generated data section with specific formatting - DO NOT CHANGE  ***

DATA: file_path TYPE string.

DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*
data: begin of record OCCURS 0,
         EVRTN_001(010),
         EBELP_002(005),
         ETNR1_003(004),
         LPEIN_04_004(001),
         EEIND_04_005(010),
         MENGE_04_006(017),
       end of record.


START-OF-SELECTION.


   SELECTION-SCREEN BEGIN OF BLOCK mode WITH FRAME TITLE text-003.

   PARAMETERS: file_url TYPE  rlgrap-filename MODIF ID xyz .

   SELECTION-SCREEN END OF BLOCK mode .

*PARAMETERS: dataset(132) lower case.
*perform open_dataset using dataset.
*Uploading data from the local file C:\MSchedule.txt
*CALL FUNCTION 'WS_UPLOAD'
* EXPORTING
*   FILENAME                      = 'C:\MSCHEDULE.TXT'
*   FILETYPE                      = 'DAT'
*  TABLES
*    data_tab                      = I_BDCDATA .
*
*IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.



AT SELECTION-SCREEN ON VALUE-REQUEST FOR file_url.
   CALL FUNCTION 'F4_FILENAME'
     EXPORTING
       program_name  = syst-cprog
       dynpro_number = syst-dynnr
       field_name    = 'FILE_URL'
     IMPORTING
       file_name     = file_url.

   start-of-selection.

   IF NOT file_url IS INITIAL.

     MOVE  file_url TO file_path.
     PERFORM read_file.
   ENDIF.


perform open_group.
perform close_group. "Closing the BDC session
LOOP AT RECORD. "Filling the BDC table with data

*read dataset dataset into record.

perform bdc_dynpro      using 'SAPMM06E' '0205'.
perform bdc_field       using 'BDC_CURSOR'
                               'RM06E-EVRTN'.
perform bdc_field       using 'BDC_OKCODE'
                               '/00'.
perform bdc_field       using 'RM06E-EVRTN'
                               record-EVRTN_001.
perform bdc_dynpro      using 'SAPMM06E' '0222'.
perform bdc_field       using 'BDC_CURSOR'
                               'EKPO-EMATN(01)'.
perform bdc_field       using 'BDC_OKCODE'
                               '=ET'.
perform bdc_field       using 'RM06E-EBELP'
                               record-EBELP_002.
perform bdc_dynpro      using 'SAPMM06E' '1117'.
perform bdc_field       using 'BDC_CURSOR'
                               'EKET-MENGE(04)'.
perform bdc_field       using 'BDC_OKCODE'
                               'BU'.
perform bdc_field       using 'RM06E-ETNR1'
                               record-ETNR1_003.
perform bdc_field       using 'RM06E-LPEIN(04)'
                               record-LPEIN_04_004.
perform bdc_field       using 'RM06E-EEIND(04)'
                               record-EEIND_04_005.
perform bdc_field       using 'EKET-MENGE(04)'
                               record-MENGE_04_006.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                               '=YES'.
perform bdc_transaction using 'ME38'.
ENDLOOP.



FORM read_file .
   CALL FUNCTION 'GUI_UPLOAD'
     EXPORTING
       filename                      = file_path
      filetype                       = 'ASC'
      has_field_separator            = 'X'
*   HEADER_LENGTH                 = 0
      read_by_line                   = 'X'
*   DAT_MODE                      = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
* IMPORTING
*   FILELENGTH                    =
*   HEADER                        =
     TABLES
       data_tab                      = record
* EXCEPTIONS
*   FILE_OPEN_ERROR               = 1
*   FILE_READ_ERROR               = 2
*   NO_BATCH                      = 3
*   GUI_REFUSE_FILETRANSFER       = 4
*   INVALID_TYPE                  = 5
*   NO_AUTHORITY                  = 6
*   UNKNOWN_ERROR                 = 7
*   BAD_DATA_FORMAT               = 8
*   HEADER_NOT_ALLOWED            = 9
*   SEPARATOR_NOT_ALLOWED         = 10
*   HEADER_TOO_LONG               = 11
*   UNKNOWN_DP_ERROR              = 12
*   ACCESS_DENIED                 = 13
*   DP_OUT_OF_MEMORY              = 14
*   DISK_FULL                     = 15
*   DP_TIMEOUT                    = 16
*   OTHERS                        = 17
             .
   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.                    " read_file



*perform close_dataset using dataset.
FORM OPEN_GROUP.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'SESSION1'
USER = SY-UNAME
KEEP = 'X'.
IF SY-SUBRC <> 0.
WRITE 'ERROR IN OPEN_GROUP'.
ENDIF.
ENDFORM.

FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR I_BDCDATA.
I_BDCDATA-PROGRAM = PROGRAM.
I_BDCDATA-DYNPRO = DYNPRO.
I_BDCDATA-DYNBEGIN = 'X'.
APPEND I_BDCDATA.
ENDFORM.

FORM BDC_FIELD USING FNAM FVAL.
CLEAR I_BDCDATA.
I_BDCDATA-FNAM = FNAM.
I_BDCDATA-FVAL = FVAL.
APPEND I_BDCDATA.
ENDFORM.

FORM BDC_TRANSACTION USING TCODE.
CALL FUNCTION 'BDC_INSERT'
EXPORTING TCODE = TCODE
TABLES DYNPROTAB = I_BDCDATA.
ENDFORM.

FORM CLOSE_GROUP.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
ENDFORM. " CLOSE_GROUP

How to enable standard and custom fields after error message in selection screen

$
0
0

Hello Experts,

 

I am facing an issue in VL10A (Program: RVV50R10C , Screen : 1000) where I have added 3 extra select options to the the to the existing standard header select options ( Shipping Point/Receiving Pt, Deliv. Creation Date, CalcRuleDefltDlvCrDt ) and I would like to enable the new custom fields and standard fields back for input if the user enters any invalid data.

 

 

When I added the new custom fields in the standard screen 1000 the system has included these new fields in the CHAIN..ENDCHAIN but the fields are getting disabled after the error message. Also I do not see any enhancement spots in the PAI of the selection screen like we have in the standard screen of ME11 tcode. 

 

Please suggest me.

 

Thanks,
Uday.

ABAP Run time error (GETWA_NOT_Assigned_RANGE) while running print job in F110

$
0
0

Hi Experts,

 

I am getting ABAP Run time error (GETWA_NOT_Assigned_RANGE) while running print job in APP (F110).  System is not generating emails for ACH payment advice but its creating ACH file, creating payment documents and creating IDOC’s also. If I run the same program (RFFOAVIS_FPAYM) in foreground through SE38, system is creating emails for payment advice's, ACH file and IDOC’s. The same emails I can see in SOST. But I don’t understand why system is not creating emails in background. Even though we are using the same program for other two company code and its working fine for these two company codes. We have copied script from one company code to other company codes. I have gone through couple of SAP note 490215, 926446, 1336884 and 1476325. But we are using all sap standard program.I have attached print Job log also. Help will be highly appreciated.

 

JOb log.png

Thanks & Regards

R.k

Issue with LSMW for Customer Creation using XD01

$
0
0

Hello All,

 

I am trying to create Customers using LSMW using Standard Batch/Direct Input (RFBIDE00 program).

 

My structure is as below.

Structure.JPG

 

I have maintained the structure relations.

 

mapping.JPG

 

When I try to create the batch input session it is giving an error that company code is not entered and data in table BKNB5 cannot be processed. But actually I have given company code. Can someone please let me know if something is missing?

 

error.JPG

 

Thank you,

Sri.


understanding TS17900100 on HCM workflow

VBUP-BESTA... and a non-working day

$
0
0

All,

I'm using a custom web service to create an order in SAP ECC 6.0 from BAPI_SALESORDER_CREATEFROMDAT2.  After the order creates, while still in the web service, I read VBUP-BESTA to make further business decisions about the line items of the order, such as by looking for a value of 'C' to know that the article was in-stock and 'completely processed'. 

This works fine for me until I change a shipping point calendar to be a non-working day, at which point I never get a 'C' for completely processed.  Can someone tell me specifically why an order that's not due to ship for days can not have a status of completely processed on a non-working day?  And is there any other form of item level status that I could check to receive the same type of feedback, regardless of a non-working day?

 

Thanks in advance for you help,

Kevin

How to bold a row in SALV

$
0
0

Hi all,

 

I have a tough time to figure out on how to bold a row in SALV.

I know we can do it in normal ALV by utilizing the fieldcatalog attribute but how we can achieve it in SALV?

 

Thanks.

 

Regards,

Marlson

to change variable defaulted values dynamically using field symbol

$
0
0

Hi Team,

 

Suppose in my program, I have declared two variables and defaulted values there itself.

 

data:var_a  type c value 'X',

       var_b  type i value '102.

 

***********************************************

***********************************************

 

Now in the middle of program I want ot change the values based on what is present in data base .

 

In my datbase table the values are like this,

 

ParameterValue
var_aK
var_b500

 

 

I have to fetch teh new values and change the variable var_a and var_b values , and those values are used in later part of my program.

 

After the change write:var_a, var_2. should print K and 500.

 

Can anybody help me with  a very small smaple program that does that.

 

Thanks,

Sourya Prakash.

Parameter to be passed for GN_INVOICE_CREATE

$
0
0

Hi,

 

I am using the function module GN_INVOICE_CREATE to create invoice without referring to any document.But the pricing value is not getting populated even though I am passing the condition type and condition value.Can any one send me the sample code for this.

 

 

Thanks,

Akshatha

Viewing all 8332 articles
Browse latest View live


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