Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dynpro + editable rows

Former Member
0 Likes
2,268

Hello Friends,

In our of program we have a screen, which contains 3 columns, my task was to upload text in these columns from file. I have place the button and it works properly. But recently I have noticed that, it does not work properly in following senario:

If the screen contains already data ( for example 1 or many rows)then when I call that specific screen, it appers as non-editable, and in that when ( when screen is non-editable) when I try to load a file, it does not work ? any idea what's going on ....

Many thanks and kind regards,

Shah H.

25 REPLIES 25
Read only

Former Member
0 Likes
2,237

Hi,

are you using ALV GRID class. is it ALV Grid control report. please give some more info.

Regards

vijay

Read only

0 Likes
2,237

Hi Vijay,

Good that you are over SDN at this time

No its not ALV, its simply a screen, with pbo and pai stuff, if my screen does not contains any row, it appears with editable and if screen contains some rows, and I execute this screen it appears as non-editable.

Thanks and kind regards,

Shah H.

Read only

0 Likes
2,237

Hi,

then is it a table control,and also some where you are setting the condition in your coding.and Did you check this Demo <b>RSDEMO_TABLE_CONTROL</b>, here also if there is any record then it is disable mode. But if there are no records all rows are in editable mode,

some where you are setting the codition and making it disable. i think you are setting the tclines to your number of records.

Regards

vijay

Regards

vijay

Read only

0 Likes
2,237

Hi Vijay,

Actually it was not my coading, I just get the task for uploading the file, I dont know why it goes non-edit or disable mode when it has any record.....

Any suggestion, by the way I thought its something standard screen functionality

I'll look into the demo you provided....

Read only

0 Likes
2,237

Hi,

in the Demo program i checked.and find this..in the PBO they are doing like this..


MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'GRUND'.
  SET TITLEBAR '100'.
  IF INIT IS INITIAL.
* Datenbeschaffung
   SELECT CARRID CONNID CITYFROM AIRPFROM CITYTO AIRPTO DEPTIME ARRTIME
            DISTANCE DISTID
            FROM SPFLI
            INTO CORRESPONDING FIELDS OF TABLE SDYN_ITAB.
   <b> DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.</b>    INIT = 'X'.
  ENDIF.

ENDMODULE.                             " STATUS_0100  OUTPUT

<b> DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.</b>

if there are no records in <b>SDYN_ITAB</b> then all are coming in editable mode.

<b>if the no of records are more than one then those records will be in editable mode and rest in disable mode.</b>

you are setting no of visible lines in the table control screen.

Regards

vijay

Message was edited by: Vijay Babu Dudla

Read only

0 Likes
2,237

Hi Vijay,

From which point you got this that, it is disable when contains any lines...? can I also ask, how you get till this demo example ?

is INIT is editable flag?? I have to look into it if I have one in my program too....

I dont want to place anything in non-editable mode...

Message was edited by: Shah H

Read only

0 Likes
2,237

Hi,

This Demo if famous one. and also INIT is not editable flag. when the data is already there in itab to avoid reselection they used that init flag in PBO.

and place a Break point and see.

MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'GRUND'.
  SET TITLEBAR '100'.
  IF INIT IS INITIAL.
* Datenbeschaffung
   SELECT CARRID CONNID CITYFROM AIRPFROM CITYTO AIRPTO DEPTIME ARRTIME
            DISTANCE DISTID
            FROM SPFLI
            INTO CORRESPONDING FIELDS OF TABLE SDYN_ITAB.
<b>    DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.</b> 
   INIT = 'X'.
  ENDIF.

ENDMODULE.                             " STATUS_0100  OUTPUT

<i>I dont want to place anything in non-editable mode...</i>

then you can do this ...isntead of this...

<b> DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.</b>

do this , this will make hundred rows editable.

if you want more then dynamically give that based on your file no of records.

<b>TABLE_CONTROL-LINES = 100.</b>

RegArds

vijay

Read only

0 Likes
2,237

HI Vijay,

I am sorry, I still did not get, where is the functionality to make the rows able/dis-able... in demo program, in the program I am working, there is also not similar functionality or so....

Can you pls explain this line

DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.

I guess it tells how many rows are in SDYN_ITAB... into table_control-lines ( but how it makes them able/disable)

Read only

0 Likes
2,237

<b>DESCRIBE TABLE SDYN_ITAB LINES TABLE_CONTROL-LINES.</b>

it describes the no of records in SDYn_TAB and pass it to table control. so that many records it will show in the table control in editable mode.By default all are in editable mode if you go to screen and see.But when you have that many no of line items then it will show only those records in editable mode. if you want more records to show in editable mode you have to add to if i have only 20 records, i want 100 records then i have to pass like this.

TABLE_CONTROL-LINES = 100.

Rest will be in disable mode. the paramter TABLE_CONTROL-LINES will control that.

Regards

vijay

Read only

0 Likes
2,237

Hi Vijay,

Thanks for your kind explanation....

I am very much intrested to see, where in that BLADDY coading which I have this goes dis-able...

aaah My Godness....

Read only

0 Likes
2,237

Hi Vijay,

Okey, when I place tablecontrol-lines = 10, it shows me in edit mode, but I am still curios to know, where the bladdy program makes it uneditable ? can you please point out this for me even in demo application.

Many thanks and kind regards,

Read only

0 Likes
2,237

Hi,

Thats how table control works.when you have that many records in the internal table it will show them in editmode and the rest of the Rows it will show in disable mode.This pramter <b>tablecontrol-lines</b>

plays the role .There is no coding , it is handled internally.

Regards

vijay

Read only

0 Likes
2,237

What is the Program you are looking at...

and do you have any Loop at screen code in your program.

please tell your program name.

Regards

vijay

Read only

0 Likes
2,237

Hi Vijay,

I have to see what are basically TABLE CONTROLS, but thanks for your kind support, you surely deserve points,

I have to see also, how I can dynamically set the tablecontrol-lines ( after reading from file).

Take Care, and khudahafiz.

PS: Are you from india, ? or working here in germany or so ?

Read only

0 Likes
2,237

Hi Vijay,

its not standard program, the problem is that, actually the functionality of ( table-control etc ) is not in PBO of this screen rather PAI of the screen one before..... because of this reason it tooks me a bit more time to see, what's going on, ( as I was looking in PBO of this screen and ofcourse did not able to find anything)..

Regards,

Read only

0 Likes
2,237

Hi,

for table control help read this..

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table control in abap.pdf

first upload the File data to Internal table using GUI_UPLOAD . then describe the table itab.

<b>DESCRIBE TABLE ITAB LINES TABLE_CONTROL-LINES.</b>

this will take care of visible rows in table control.

can you show your code in PAI and PBO

Regards

vijay

Read only

0 Likes
2,237

Hello Vijay,

Many thanks for the link, sure I can provide the code of PBO and PAI, but its too much code..... should I drop you a mail ??? or so....

I have already functionality implemented for uploading form file and clipboard..... now I have to see how and where I should assign these values to table control...I will do this now, and will let you know if it works..

Read only

0 Likes
2,237

Hi Vijay,

I have a problem I cant set the dynamic size of file, becuase the file comes later, and able/dis-able functionality comes before.....

I have just seen, there is a component called INVISIBLE, can I make it false, then do you think it will work ??

Read only

0 Likes
2,237

Hi,

INVISIBLE is used to make the column invisible in the table control.Can you explain your Program Functionality.

how file comes next, you mean after display you are clicking some button and uploading .

in that set tc-lines = 0. this makes all columns in editable mode.

Regards

vijay

Read only

0 Likes
2,237

Hello Vijay,

Great there you tipped the correct solution ,

it works, perfectly fine, as expected, I am really thankful to you, kia aap india main hee hou or outside ,

Regards,

Read only

0 Likes
2,237

Hi,

i am in india only. and from Hyderabad,

forgot to tell you..

where are you from..

Good luck.

Regards

vijay

Read only

0 Likes
2,237

hi,

I am from pakistan, but now a days in germany, Are you developing , how many years you are already developing using ABAP.

Actually I am J2EE developer, but now a days I have been assigned ABAP stuff, which are new to me, and hard to find correct information, I mean the beauty of JAVA-DOC I miss in SAP/ABAP world

Regards,

Read only

0 Likes
2,237

yes i am developer. i am having 2 years experience.

here(SAP) also you can get good help.

you have SDN to help if you have any doubt.

Regards

vijay

Read only

0 Likes
2,237

Hi,

wow, with 2 years of experience, you have good grip over SAP, I mean I am working for last 7 or 8 months, but still dont know where to look-in for the right things......SDN is ofcourse a good place, but I always tries to fix the issue by myself, and that's why you remember I ask you, from WHERE and HOW you find that 'FAMOUS' demo which you provided in one of your post. ( I am intrested to know how to extract right stuff form SAP environment)

Do you have MSN or yahoo, ? add me if you dont mind as hayder_zaidi@hotmail.com.

Regards,

Message was edited by: Shah H

Read only

Former Member
0 Likes
2,237

i am on yahoo always.

yahoo messenger <b>vijay_bits200</b>@yahoo